Added custom headers option
This commit is contained in:
+10
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user