Score:0

Set header for all except one location

cn flag

I'd like to set a header on all page request except for one. I've tried the following:

location ~ ^\/(?!allow-iframes) { 
  add_header 'X-Frame-Options' 'DENY';
}

This has some unexpected behavior. It causes a 301 redirect on all pages except /allow-iframes.

I came across this but I can't use map since it only works inside http and not inside the server context.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.