Prise en compte d'un sitemap dans robots.txt
This commit is contained in:
parent
807eef682f
commit
95431aa927
5 changed files with 24 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
dest: /opt/{{ docker_grav_service_id }}/
|
||||
with_items:
|
||||
- docker-compose.yml
|
||||
- robots-sitemap.txt
|
||||
notify: docker-compose-up
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Header set Content-Security-Policy "default-src 'self'; img-src 'self'; style-src 'self'; script-src 'self'; object-src 'none'"
|
||||
|
||||
ProxyErrorOverride off
|
||||
RequestHeader unset Authorization
|
||||
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
# {{ ansible_managed }}
|
||||
<LocationMatch "^/admin/">
|
||||
SecRuleRemoveById 933210
|
||||
SecRuleRemoveById 949110
|
||||
</LocationMatch>
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ services:
|
|||
- PGID=1000
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ./robots-sitemap.txt:/app/grav-admin/robots.txt
|
||||
- /data1/{{ docker_grav_service_id }}/config:/config
|
||||
restart: always
|
||||
labels:
|
||||
|
|
17
templates/robots-sitemap.txt
Normal file
17
templates/robots-sitemap.txt
Normal 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$
|
Loading…
Reference in a new issue