Created
December 15, 2021 05:45
-
-
Save nolim1t/4380c34df24a7d92eb2ea304829601d3 to your computer and use it in GitHub Desktop.
Regex based forwarding for nginx
This file contains hidden or 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
server { | |
# match all requests | |
location ~ ^(.*)$ { | |
# send headers to client | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
# forward to below | |
proxy_pass http://localhost:12345; | |
} | |
# listen on ports | |
listen 80; | |
listen [::]:80; | |
# server entry | |
server_name servername.nolim1t.co; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment