-
-
Save Death916/6edcca3ec6c3df9df7301256963bade1 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
location / { | |
# The default ports: | |
# lemmy_ui_port: 1236(not used here) | |
# lemmy_port: 8536 | |
set $proxpass "http://100.117.212.36:1236"; | |
if ($http_accept ~ "^application/.*$") { | |
set $proxpass "http://100.117.212.36:8536"; | |
} | |
if ($request_method = POST) { | |
set $proxpass "http://100.117.212.36:8536"; | |
} | |
proxy_pass $proxpass; | |
rewrite ^(.+)/+$ $1 permanent; | |
# Send actual client IP upstream | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment