전송 최적화: nginx gzip·이미지 lazy-load·캐시 연장

- nginx 텍스트 자산 gzip 압축 추가로 css/js/json/HTML 전송량 절감
- cardList 카드 이미지 lazy-load로 시리즈 진입 시 즉시 다운로드 방지
- 정적 이미지 캐시 7일→30일 연장
- 미사용 style/deck-history.css 삭제

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-03 14:52:18 +09:00
parent a90bdcbe13
commit af721d327d
10 changed files with 47 additions and 567 deletions

View File

@@ -7,6 +7,20 @@ server {
client_max_body_size 25m;
# 텍스트 자산 gzip 압축 (이미지는 제외)
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_proxied any;
gzip_types
text/plain
text/css
application/javascript
application/json
image/svg+xml
application/manifest+json;
# 공유 링크 → 덱 로드 페이지
location ~ ^/d/([A-Za-z0-9]+)$ {
return 302 /cardList.html?d=$1;
@@ -59,9 +73,9 @@ server {
try_files $uri =404;
}
# 이미지 등
# 이미지 등 — 내용이 고정된 정적 자산이므로 장기 캐시
location ~* \.(png|jpg|jpeg|gif|webp|ico|svg|woff2?)$ {
expires 7d;
expires 30d;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}