Merge branch 'dev'
This commit is contained in:
@@ -7,8 +7,11 @@ server {
|
|||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# SPA: 새로고침/직접 진입 시 index.html 로 폴백 (vue-router history 모드)
|
# SPA: 새로고침/직접 진입 시 index.html 로 폴백 (vue-router history 모드)
|
||||||
|
# 진입 HTML(루트·폴백)은 캐시 금지 — 배포로 청크 해시가 바뀌어도 항상 최신 진입점을 받도록.
|
||||||
|
# (루트 '/' 는 아래 '= /index.html' 매칭을 안 타므로 여기에 헤더를 둬야 함)
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
add_header Cache-Control "no-cache";
|
||||||
}
|
}
|
||||||
|
|
||||||
# index.html 은 캐시 금지 — 배포로 청크 해시가 바뀌어도 항상 최신 진입점을 받도록.
|
# index.html 은 캐시 금지 — 배포로 청크 해시가 바뀌어도 항상 최신 진입점을 받도록.
|
||||||
|
|||||||
+9
-2
@@ -1,7 +1,7 @@
|
|||||||
// Slim Budget 데스크톱(Electron) 메인 프로세스.
|
// Slim Budget 데스크톱(Electron) 메인 프로세스.
|
||||||
// 라이브 사이트(https://app.sblog.kr)를 직접 로드한다 → 프론트 변경이 자동 반영(재설치 불필요),
|
// 라이브 사이트(https://app.sblog.kr)를 직접 로드한다 → 프론트 변경이 자동 반영(재설치 불필요),
|
||||||
// 같은 출처라 CORS 우회도 불필요. 배포된 웹 게이트가 Electron 을 감지해 안내페이지 대신 전체 앱을 띄운다.
|
// 같은 출처라 CORS 우회도 불필요. 배포된 웹 게이트가 Electron 을 감지해 안내페이지 대신 전체 앱을 띄운다.
|
||||||
const { app, BrowserWindow, shell } = require('electron')
|
const { app, BrowserWindow, shell, session } = require('electron')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
@@ -81,7 +81,14 @@ function createWindow() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(async () => {
|
||||||
|
// 시작 시 HTTP 캐시 비움 → 라이브 사이트의 최신 프론트를 항상 로드(옛 HTML 캐시로 인한 미반영 방지).
|
||||||
|
// localStorage(로그인 세션)는 캐시가 아니라 영향 없음.
|
||||||
|
try {
|
||||||
|
await session.defaultSession.clearCache()
|
||||||
|
} catch {
|
||||||
|
/* 캐시 클리어 실패 무시 */
|
||||||
|
}
|
||||||
createWindow()
|
createWindow()
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||||
|
|||||||
Reference in New Issue
Block a user