Features: 1) Add new /static/ and /media/ location blocks for serving static and media files.

Fixes: 1) Normalize spacing and indentation throughout `nginx.conf`.

Extra: Improve readability and consistency of configuration file by aligning header and directive formatting.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-11-10 13:01:07 +03:00
parent cd2e6c31cf
commit 10434d8e2b

View file

@ -48,6 +48,16 @@ server {
default_type text/plain; default_type text/plain;
} }
location /static/ {
add_header Access-Control-Allow-Origin "*";
root /var/jenkins/workspace/evibes;
}
location /media/ {
add_header Access-Control-Allow-Origin "*";
root /var/jenkins/workspace/evibes;
}
error_page 500 502 503 504 /maintenance.html; error_page 500 502 503 504 /maintenance.html;
location = /maintenance.html { location = /maintenance.html {
add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Origin "*";
@ -137,11 +147,6 @@ server {
default_type text/plain; default_type text/plain;
} }
location /static/ {
add_header Access-Control-Allow-Origin "*";
root /var/jenkins/workspace/evibes;
}
location /favicon.ico { location /favicon.ico {
add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Origin "*";
root /var/jenkins/workspace/evibes/static; root /var/jenkins/workspace/evibes/static;