Fix HTML rendering for service descriptions, allow zero price for services, improve image_url handling
This commit is contained in:
@@ -8,6 +8,10 @@ server {
|
||||
|
||||
# Disable ModSecurity for this site
|
||||
modsecurity off;
|
||||
|
||||
# Buffer sizes
|
||||
large_client_header_buffers 4 32k;
|
||||
client_header_buffer_size 8k;
|
||||
|
||||
# Logs
|
||||
access_log /var/log/nginx/prompttech-access.log;
|
||||
@@ -20,17 +24,18 @@ server {
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
||||
|
||||
# Proxy to React dev server
|
||||
# Serve built React static files
|
||||
root /media/pts/Website/PromptTech_Solution_Site/frontend/build;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Static file caching
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# API proxy to FastAPI backend
|
||||
@@ -53,4 +58,18 @@ server {
|
||||
proxy_send_timeout 300s;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
# Proxy uploads to backend (media files) - ^~ prevents regex match
|
||||
location ^~ /uploads/ {
|
||||
proxy_pass http://127.0.0.1:8181/uploads/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# Cache uploaded media files
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user