Skip to content

How to do custom headers with multiple sources #316

Closed Answered by joseluisq
pizzapanther asked this question in Q&A
Discussion options

You must be logged in to vote

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.

[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

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pizzapanther
Comment options

@joseluisq
Comment options

Answer selected by pizzapanther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested v2 v2 release
2 participants