-
-
Notifications
You must be signed in to change notification settings - Fork 25
nginx: route /switch and /status to selkies supervisor (dual-mode) #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
a1216e7
a835c89
7c23db7
de8f481
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,24 @@ server { | |
| add_header X-Content-Type-Options "nosniff"; | ||
| } | ||
| } | ||
| location = SUBFOLDERswitch { | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| proxy_http_version 1.1; | ||
| proxy_buffering off; | ||
| proxy_pass http://127.0.0.1:SUPERVISOR_PORT/switch; | ||
| } | ||
| location = SUBFOLDERstatus { | ||
|
Comment on lines
+51
to
+60
|
||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| proxy_http_version 1.1; | ||
| proxy_buffering off; | ||
| proxy_pass http://127.0.0.1:SUPERVISOR_PORT/status; | ||
| } | ||
| error_page 500 502 503 504 /50x.html; | ||
| location = SUBFOLDER50x.html { | ||
| root /usr/share/selkies/web/; | ||
|
|
@@ -106,6 +124,24 @@ server { | |
| add_header X-Content-Type-Options "nosniff"; | ||
| } | ||
| } | ||
| location = SUBFOLDERswitch { | ||
| proxy_set_header Host $host; | ||
|
DL6ER marked this conversation as resolved.
|
||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| proxy_http_version 1.1; | ||
| proxy_buffering off; | ||
| proxy_pass http://127.0.0.1:SUPERVISOR_PORT/switch; | ||
| } | ||
| location = SUBFOLDERstatus { | ||
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| proxy_http_version 1.1; | ||
| proxy_buffering off; | ||
| proxy_pass http://127.0.0.1:SUPERVISOR_PORT/status; | ||
| } | ||
| error_page 500 502 503 504 /50x.html; | ||
| location = SUBFOLDER50x.html { | ||
| root /usr/share/selkies/web/; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,10 @@ NGINX_CONFIG=/etc/nginx/sites-available/default | |||||||||||||||||||
| CPORT="${CUSTOM_PORT:-3000}" | ||||||||||||||||||||
| CHPORT="${CUSTOM_HTTPS_PORT:-3001}" | ||||||||||||||||||||
| CWS="${CUSTOM_WS_PORT:-8082}" | ||||||||||||||||||||
|
DL6ER marked this conversation as resolved.
|
||||||||||||||||||||
| # Port of the selkies dual-mode supervisor API (/switch and /status). | ||||||||||||||||||||
| # Only consulted when SELKIES_ENABLE_DUAL_MODE=true on the selkies side; | ||||||||||||||||||||
| # this value drives nginx routing only, not the selkies bind port. | ||||||||||||||||||||
| SUP="${SELKIES_SUPERVISOR_PORT:-8082}" | ||||||||||||||||||||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. follow-up patches default to 8084 once selkies-project/selkies#237 lands, converting this to a draft right now
Comment on lines
+10
to
+13
|
||||||||||||||||||||
| # Only consulted when SELKIES_ENABLE_DUAL_MODE=true on the selkies side; | |
| # this value drives nginx routing only, not the selkies bind port. | |
| SUP="${SELKIES_SUPERVISOR_PORT:-8082}" | |
| # Selkies currently binds the supervisor API to 8082 only; this script | |
| # configures nginx routing and must not allow unsupported values here. | |
| if [ -n "${SELKIES_SUPERVISOR_PORT+x}" ] && [ "${SELKIES_SUPERVISOR_PORT}" != "8082" ]; then | |
| printf 'WARNING: Ignoring unsupported SELKIES_SUPERVISOR_PORT=%s; selkies currently binds the supervisor API to 8082 only.\n' "${SELKIES_SUPERVISOR_PORT}" >&2 | |
| fi | |
| SUP="8082" |
Uh oh!
There was an error while loading. Please reload this page.