|
@@ -3,10 +3,11 @@ server {
|
|
|
|
|
|
|
|
root /var/www/radionica3d/dist;
|
|
root /var/www/radionica3d/dist;
|
|
|
index index.html;
|
|
index index.html;
|
|
|
|
|
+ charset utf-8;
|
|
|
|
|
|
|
|
# Gzip Compression
|
|
# Gzip Compression
|
|
|
gzip on;
|
|
gzip on;
|
|
|
- gzip_static on;
|
|
|
|
|
|
|
+ gzip_static on; # Serve .gz files if they exist
|
|
|
gzip_vary on;
|
|
gzip_vary on;
|
|
|
gzip_proxied any;
|
|
gzip_proxied any;
|
|
|
gzip_comp_level 6;
|
|
gzip_comp_level 6;
|
|
@@ -21,8 +22,11 @@ server {
|
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
|
|
# add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
|
|
# add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
|
|
|
|
|
|
|
|
|
|
+ # SEO & Prerendering Optimization
|
|
|
location / {
|
|
location / {
|
|
|
- try_files $uri $uri/ /index.html;
|
|
|
|
|
|
|
+ # First attempt to serve request as file, then as directory/index.html,
|
|
|
|
|
+ # then fall back to the main index.html (SPA)
|
|
|
|
|
+ try_files $uri $uri/index.html /index.html;
|
|
|
|
|
|
|
|
# Caching for index.html (don't cache)
|
|
# Caching for index.html (don't cache)
|
|
|
location = /index.html {
|
|
location = /index.html {
|