nginx no-cache
This commit is contained in:
parent
f55b777a17
commit
c5f3a65304
2 changed files with 45 additions and 31 deletions
|
|
@ -13,10 +13,10 @@ server {
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name devops.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/devops.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/devops.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
|
|
@ -25,16 +25,17 @@ server {
|
|||
proxy_set_header Upgrade $http_upgrade;
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# chat.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name chat.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/chat.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/chat.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3001; # ← PORT bilgisi güncellendi
|
||||
|
|
@ -43,16 +44,17 @@ server {
|
|||
proxy_set_header Upgrade $http_upgrade;
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# ai.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name ai.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/ai.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/ai.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5678;
|
||||
|
|
@ -64,16 +66,16 @@ server {
|
|||
proxy_send_timeout 300;
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# api.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name api.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/api.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/api.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
underscores_in_headers on;
|
||||
ignore_invalid_headers off;
|
||||
|
|
@ -96,49 +98,62 @@ server {
|
|||
|
||||
proxy_set_header __tenant $http___tenant; # ← ÖNEMLİ
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# cdn.sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name cdn.sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/cdn.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/cdn.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# sozsoft.com
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name sozsoft.com;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/sozsoft.com-0001/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/sozsoft.com-0001/privkey.pem; # managed by Certbot
|
||||
|
||||
underscores_in_headers on;
|
||||
ignore_invalid_headers off;
|
||||
large_client_header_buffers 4 16k;
|
||||
|
||||
location = /index.html {
|
||||
proxy_pass http://127.0.0.1:3002;
|
||||
include /etc/nginx/proxy_params;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
location = /sw.js {
|
||||
proxy_pass http://127.0.0.1:3002;
|
||||
include /etc/nginx/proxy_params;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3002;
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name ~^(?!(devops|chat|ai|api|cdn)\.).*\.sozsoft\.com$;
|
||||
|
||||
ssl_certificate /etc/ssl/sozsoft.com/fullchain1.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/demo.sozsoft.com/fullchain.pem; # managed by Certbot
|
||||
ssl_trusted_certificate /etc/ssl/sozsoft.com/chain1.pem;
|
||||
ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demo.sozsoft.com/privkey.pem; # managed by Certbot
|
||||
|
||||
underscores_in_headers on;
|
||||
ignore_invalid_headers off;
|
||||
|
|
@ -148,4 +163,6 @@ server {
|
|||
proxy_pass http://127.0.0.1:3002;
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -48,18 +48,15 @@ const UpdateNotifier = () => {
|
|||
navigator.serviceWorker.getRegistration().then((reg) => {
|
||||
if (reg?.waiting) {
|
||||
reg.waiting.postMessage({ type: 'SKIP_WAITING' })
|
||||
reg.waiting.addEventListener('statechange', (e: any) => {
|
||||
if (e.target.state === 'activated') {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
if (newVersion) {
|
||||
setUiVersion(newVersion)
|
||||
window.location.href =
|
||||
ROUTES_ENUM.protected.admin.changeLog + `?v=${newVersion}`
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
setUpdateAvailable(false)
|
||||
}}
|
||||
className="rounded bg-white px-4 py-2 text-sm font-bold text-sky-600 transition hover:bg-sky-100"
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue