-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
submission: move non-loopback request check to nginx
Using nginx is more flexible way to set, which clients can submit match reports.
- Loading branch information
Showing
4 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name stats.eugenemolotov.ru; | ||
|
||
access_log /var/log/nginx/stats_access.log; | ||
error_log /var/log/nginx/stats_error.log; | ||
|
||
location / { | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-Host $http_host; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
proxy_pass http://127.0.0.1:8000; | ||
} | ||
|
||
# it is preferred, that nginx will serve static data | ||
location /static { | ||
root /home/eugene/quakelive-local-ratings; | ||
} | ||
|
||
location /stats/submit { | ||
return 403; # do not allow to submit results from outsite | ||
} | ||
|
||
location /feeder { | ||
auth_basic "Staff only"; | ||
auth_basic_user_file /etc/nginx/qllr.htpasswd; | ||
proxy_pass http://127.0.0.1:8081; | ||
} | ||
} |
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