Merge remote-tracking branch 'origin/main' into feat/apps-in-toss
This commit is contained in:
commit
2627dd2685
200 files changed
+2956
-843
No files matched your search
@@ -10,6 +10,30 @@
|
||||
|
||||
gtag('config', 'G-D378J4X373', { platform: '%MODE%' === 'toss' ? 'toss' : 'web' });
|
||||
</script>
|
||||
<script>
|
||||
// 이미 열었던 탭을 다시 열면 브라우저가 예전 HTML 을 다시 쓰고, 그 HTML 이 부르는 예전 빌드 파일은 배포로 지워져 첫 화면에서 멈춘다.
|
||||
// 빌드 파일을 못 받았거나 12초 지나도 첫 화면이 그대로면 한 번만 새로 불러온다 (30초 안에 또 하지는 않는다)
|
||||
(function () {
|
||||
var KEY = 'nalssigak.bootReload'
|
||||
function reloadOnce() {
|
||||
try {
|
||||
var last = Number(sessionStorage.getItem(KEY) || 0)
|
||||
if (Date.now() - last < 30000) return
|
||||
sessionStorage.setItem(KEY, String(Date.now()))
|
||||
} catch (e) {
|
||||
console.error('[boot] storage', e)
|
||||
}
|
||||
location.reload()
|
||||
}
|
||||
window.addEventListener('error', function (e) {
|
||||
var el = e.target
|
||||
if (el && (el.tagName === 'SCRIPT' || el.tagName === 'LINK') && /\/assets\//.test(el.src || el.href || '')) reloadOnce()
|
||||
}, true)
|
||||
setTimeout(function () {
|
||||
if (document.getElementById('boot')) reloadOnce()
|
||||
}, 12000)
|
||||
})()
|
||||
</script>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4414665130371841" crossorigin="anonymous"></script>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
|
||||
+14
-2
@@ -26,6 +26,17 @@ server {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# 인스타 올리기는 백엔드가 인스타 쪽 처리(캐러셀 컨테이너·영상 변환)를 기다리느라 1분을 넘길 수 있다 (기본 60s 면 504)
|
||||
location ~ ^/v1/(card|reel)/[0-9]+/instagram$ {
|
||||
resolver 127.0.0.11 valid=10s ipv6=off;
|
||||
set $api http://backend:9800;
|
||||
proxy_pass $api;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# API 는 같은 주소로 받아 backend 컨테이너로 넘긴다
|
||||
location /v1/ {
|
||||
# 카드뉴스 올리기(/v1/card)는 1080×1350 JPEG 최대 20장을 base64 로 한 번에 보낸다 (기본 1m 로는 413)
|
||||
@@ -52,13 +63,14 @@ server {
|
||||
}
|
||||
|
||||
location @static {
|
||||
add_header Cache-Control "no-cache";
|
||||
add_header Cache-Control "no-store";
|
||||
try_files $uri.html /index.html;
|
||||
}
|
||||
|
||||
# HTML 은 no-store: no-cache 면 다시 연 탭·뒤로 가기에서 예전 HTML 을 다시 써서, 배포로 지워진 빌드 파일을 부르다 멈춘다
|
||||
# SPA: /gak 처럼 빌드 때 만든 페이지별 HTML(gak.html)이 있으면 그것을, 없으면 index.html. 폴더는 안 찾는다 (/season 이 이미지 폴더 public/season 과 겹쳐 403)
|
||||
location / {
|
||||
add_header Cache-Control "no-cache";
|
||||
add_header Cache-Control "no-store";
|
||||
try_files $uri $uri.html /index.html;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user