Expand CORS support in Caddyfile to include truckwash.io subdomains alongside truckwash.dk and localhost.

This commit is contained in:
Jeppe Bundgaard
2026-02-16 12:21:46 +01:00
parent ac542a705e
commit 739beced0d
+2 -2
View File
@@ -8,8 +8,8 @@
root * /var/www/html
# CORS (reflect allowed origins; credentials-compatible)
# Allow only truckwash.dk subdomains and localhost for dev
@cors_origin header_regexp Origin ^https?://([a-z0-9-]+\.)?truckwash\.dk(:\d+)?$|^https?://localhost(:\d+)?$
# Allow truckwash.dk and truckwash.io subdomains and localhost for dev
@cors_origin header_regexp Origin ^https?://([a-z0-9-]+\.)?truckwash\.(dk|io)(:\d+)?$|^https?://localhost(:\d+)?$
@options method OPTIONS
header @cors_origin {