Prise en compte d'un sitemap dans robots.txt

This commit is contained in:
Navas 2022-05-19 11:46:11 +02:00
parent 807eef682f
commit 95431aa927
5 changed files with 24 additions and 2 deletions

View file

@ -9,6 +9,7 @@
dest: /opt/{{ docker_grav_service_id }}/ dest: /opt/{{ docker_grav_service_id }}/
with_items: with_items:
- docker-compose.yml - docker-compose.yml
- robots-sitemap.txt
notify: docker-compose-up notify: docker-compose-up

View file

@ -1,7 +1,5 @@
# {{ ansible_managed }} # {{ ansible_managed }}
Header set Content-Security-Policy "default-src 'self'; img-src 'self'; style-src 'self'; script-src 'self'; object-src 'none'"
ProxyErrorOverride off ProxyErrorOverride off
RequestHeader unset Authorization RequestHeader unset Authorization

View file

@ -1 +1,6 @@
# {{ ansible_managed }} # {{ ansible_managed }}
<LocationMatch "^/admin/">
SecRuleRemoveById 933210
SecRuleRemoveById 949110
</LocationMatch>

View file

@ -10,6 +10,7 @@ services:
- PGID=1000 - PGID=1000
- TZ=Europe/Paris - TZ=Europe/Paris
volumes: volumes:
- ./robots-sitemap.txt:/app/grav-admin/robots.txt
- /data1/{{ docker_grav_service_id }}/config:/config - /data1/{{ docker_grav_service_id }}/config:/config
restart: always restart: always
labels: labels:

View file

@ -0,0 +1,17 @@
Sitemap: https://{{ docker_grav_fqdn[0] }}/sitemap
User-agent: *
Disallow: /backup/
Disallow: /bin/
Disallow: /cache/
Disallow: /grav/
Disallow: /logs/
Disallow: /system/
Disallow: /vendor/
Disallow: /user/
Allow: /user/pages/
Allow: /user/themes/
Allow: /user/images/
Allow: /
Allow: *.css$
Allow: *.js$
Allow: /system/*.js$