Skip to content

Commit

Permalink
feature: migrate CORS regex to env
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonStuff authored Nov 20, 2024
1 parent 216e0b0 commit cdba290
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

${MAPS_DOMAIN}:${MAPS_PORT} {
@allowed_origins {
expression {header.Origin}.matches('^https://([a-zA-Z0-9-]+\\.)*${MAPS_SERVE_DOMAIN}$') || {header.Origin}.matches('^https://maplibre\\.org$')
expression {header.Origin}.matches('^${MAPS_SERVE_DOMAIN}$') || {header.Origin}.matches('^https://maplibre\\.org$')
}

header @allowed_origins {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A Docker container that serves PMTiles using Caddy with S3 bucket support and CO
```bash
docker run -d \
-e MAPS_DOMAIN=tiles.example.com \
-e MAPS_SERVE_DOMAIN=example.com \
-e MAPS_SERVE_DOMAIN=https://([a-zA-Z0-9-]+\\.)*example.com \
-e MAPS_PMTILES_LOCATION=s3://your-bucket \
-e AWS_ACCESS_KEY_ID=your_key \
-e AWS_SECRET_ACCESS_KEY=your_secret \
Expand Down

0 comments on commit cdba290

Please sign in to comment.