How to do custom headers with multiple sources #316
-
Is there an example of how to do customer headers for different sources:
Like |
Beta Was this translation helpful? Give feedback.
Answered by
joseluisq
Feb 22, 2024
Replies: 1 comment 2 replies
-
If I got it correctly, do you want multiple rules per specified source? [advanced]
# rule for HTML files
[[advanced.headers]]
source = "*.html"
[advanced.headers.headers]
Cache-Control = "public, max-age=36000"
# another rule for JPEG files
[[advanced.headers]]
source = "*.jpg"
[advanced.headers.headers]
Content-Security-Policy = "frame-ancestors 'self'"
# and so on |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
pizzapanther
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I got it correctly, do you want multiple rules per specified source?
then just create as many
[[advanced.headers]]
(a.k.a Toml Array of tables) as you want.