Score:0

Nginx: http auth if a header is NOT present?

ye flag

How can I make nginx ask for a basic auth if a certain header is NOT present? I have found a question where if the header is present, basic auth is shown.

How do I make the other way around?

Michael Hampton avatar
cz flag
Did you try just reversing it?
needtoask avatar
ye flag
How? That's my question actually.
Ivan Shatsky avatar
gr flag
@needtoask `map $http_<header_name> $authentication { "~." "off"; default "my_realm"; }`
needtoask avatar
ye flag
It doesn't work. I dont' understand why. What does "~." mean? (I am not an admin, just trying to figure things out here)
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.