-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
935be79
commit 8dc2751
Showing
1 changed file
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
proxy_cache_path /data/nginx/cache keys_zone=mycache:10m; | ||
server { | ||
listen 8080; | ||
listen [::]:8080; | ||
|
||
server_name localhost; | ||
|
||
proxy_cache mycache; | ||
|
||
location /login { | ||
return 404; | ||
} | ||
|
||
location /register { | ||
return 404; | ||
} | ||
|
||
location /jury { | ||
return 404; | ||
} | ||
|
||
location /team { | ||
return 404; | ||
} | ||
|
||
location /images { | ||
proxy_cache_valid any 10m; | ||
proxy_pass ${DOMJUDGE_URL}/images; | ||
} | ||
|
||
location /flags { | ||
proxy_cache_valid any 10m; | ||
proxy_pass ${DOMJUDGE_URL}/flags; | ||
} | ||
|
||
location / { | ||
rewrite ^/$ /public redirect; | ||
|
||
proxy_set_header Accept-Encoding ""; | ||
|
||
sub_filter '<a class="btn btn-info btn-sm justify-content-center" href="/login">\n' ''; | ||
sub_filter '<i class="fas fa-sign-in-alt"></i> Login\n' ''; | ||
sub_filter_once off; | ||
|
||
set $args $args&static=yes; | ||
|
||
proxy_cache_valid any 1m; | ||
proxy_pass ${DOMJUDGE_URL}; | ||
} | ||
} |