-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
46 lines (37 loc) · 1.14 KB
/
Copy pathnginx.conf
File metadata and controls
46 lines (37 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
# ✅ Add HEIC/HEIF MIME types globally (valid placement)
types {
image/heic heic;
image/heif heif;
}
sendfile on;
keepalive_timeout 65;
# Your server block should be inside the http block
server {
listen 8080;
# ✅ Allow large uploads (adjust as needed)
client_max_body_size 50M;
location / {
root /app/frontend/build;
index index.html;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://127.0.0.1:8000/api/;
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;
# ✅ Prevent caching of upload requests
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
}
}
}