feat(nginx): configure client max body size and update timeouts for API proxy
feat(clipboard): implement copyTextToClipboard utility function feat(desktop): add upload timeout for desktop client release API feat(k3s): add nginx config and update kustomization for ops-web
This commit is contained in:
@@ -684,3 +684,12 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: ops-web-nginx-config
|
||||
mountPath: /etc/nginx/http.d/default.conf
|
||||
subPath: default.conf
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: ops-web-nginx-config
|
||||
configMap:
|
||||
name: ops-web-nginx-config
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
set_real_ip_from 127.0.0.1;
|
||||
set_real_ip_from 10.42.0.0/16;
|
||||
set_real_ip_from 10.43.0.0/16;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
client_max_body_size 600M;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Never cache the SPA entrypoint — chunk hashes change every deploy and a
|
||||
# stale index.html keeps users stuck on 404'd chunks even after reload.
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
||||
expires -1;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://ops-api:8090;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 900s;
|
||||
proxy_send_timeout 900s;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
gzip_vary on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml;
|
||||
|
||||
brotli_static on;
|
||||
}
|
||||
@@ -29,6 +29,9 @@ configMapGenerator:
|
||||
- config.yaml=config/config.yaml
|
||||
- prompts.yml=config/prompts.yml
|
||||
- ops-config.yaml=config/ops-config.yaml
|
||||
- name: ops-web-nginx-config
|
||||
files:
|
||||
- default.conf=config/ops-web-nginx.conf
|
||||
|
||||
images:
|
||||
- name: geo-rankly/migrate
|
||||
|
||||
Reference in New Issue
Block a user