Skip to content

Commit

Permalink
Merge pull request #115 from GeertHuygen/sitemap-fix
Browse files Browse the repository at this point in the history
Add sitemap handling to Nginx and update Caddy config
  • Loading branch information
shyim authored Jan 6, 2025
2 parents 97db4b2 + c280caa commit 504c927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion caddy/rootfs/etc/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ log

route {
@default {
not path /theme/* /media/* /thumbnail/* /bundles/* /sitemap/*
not path /theme/* /media/* /thumbnail/* /bundles/*
}
root * /var/www/html/public
php_fastcgi @default unix//tmp/php-fpm.sock {
Expand Down
5 changes: 5 additions & 0 deletions nginx/rootfs/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ http {
deny all;
}

# Allow sitemap requests to hit the shopware application
location ~ ^/sitemap/.*\.(xml|xml\.gz)$ {
try_files $uri /index.php$is_args$args;
}

location ~ ^/(theme|media|thumbnail|bundles|css|fonts|js|recovery|sitemap)/ {
expires 1y;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
Expand Down

0 comments on commit 504c927

Please sign in to comment.