Added custom headers option

This commit is contained in:
2026-03-31 14:17:46 +02:00
parent e4b9c36486
commit f0eeaecbb1
3 changed files with 69 additions and 12 deletions
+10 -2
View File
@@ -9,20 +9,28 @@ sites:
domain: docs.my-lib.com
deploy_token: "${MY_LIB_DEPLOY_TOKEN}"
enabled: true
not_found_file: 404.html
forward_rules:
- source: /npm
destination: https://www.npmjs.com/package/my-lib
status_code: 302
- source: ^/docs/v(\d+)$
destination: https://v$1.docs.my-lib.com/
status_code: 301
regex: true
- source: ^/blog/(?P<slug>[^/]+)$
destination: /posts/${slug}
status_code: 302
regex: true
custom_headers:
- source: /json/* # glob (default)
headers:
Content-Type: "application/json"
Cache-Control: "max-age=7200, must-revalidate"
- source: ^/api/v\d+/ # regex opt-in
regex: true
headers:
Cache-Control: "no-store"
- repo: portfolio
owner: yourname