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
Header redirect/lobby variable port number #9940
Header redirect/lobby variable port number #9940
Conversation
'sudo nginx -t' was generating this warning: > nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/sites-enabled/default:21
Adds an NGINX config that checks the 'triplea-version' header value, and based on that value redirects. To support running multiple servers on the same host, we need to parameterize the lobby server to be able to inject port number. The end goal is we can have multiple lobbies running on the same host, different port numbers, and clients will be redirected to the correct lobby based on version number in header.
proxy_read_timeout 90; | ||
|
||
proxy_redirect https://localhost:443 https://localhost:8080; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 'proxy_redirect' line is seemingly unneeded. While testing, this line did not seem to matter.
@@ -15,7 +15,6 @@ server { | |||
ssl_certificate {{ cert }} | |||
ssl_certificate_key {{ cert_key }} | |||
|
|||
ssl on; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 'ssl on' directive is deprecated. This line listen 443 ssl http2;
is enough to enable SSL
# Note: header names automatically have dashes converted to underscores. | ||
# Headers containing underscores are ignored entirely! | ||
lobby_proxy_pass: | | ||
if ($http_triplea_version = "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'if' is evil in NGINX apparently: https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
I tried a solution that used map
to createa $lobbby_server
variable - though that did not work at all for the websocket proxy_pass
configurations.
Codecov Report
@@ Coverage Diff @@
## master #9940 +/- ##
============================================
- Coverage 27.16% 27.15% -0.01%
Complexity 7793 7793
============================================
Files 1207 1207
Lines 79186 79186
Branches 10891 10891
============================================
- Hits 21507 21502 -5
- Misses 55604 55608 +4
- Partials 2075 2076 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, the progress you made there is very impressive
Change Summary & Additional Notes
commit f68abbe
commit 860ed08 (header-redirect/wip)
Release Note