Last active
December 11, 2024 04:30
-
-
Save nxvipin/22f604d5e2950c97cad2fe8e3ff4598b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream p1 { | |
server foo.com; | |
} | |
upstream p2 { | |
server bar.com; | |
} | |
# Select upstream based on the value of query parameter `product` | |
map $arg_product $profile{ | |
default "p1"; | |
foo "p1"; | |
bar "p2"; | |
} | |
server { | |
location /foobar { | |
proxy_pass http://$profile; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment