Skip to content

Commit c30a73b

Browse files
authored
Merge pull request #58 from jinseok1006/main
cloudflare 헤더 추가
2 parents 03e26cd + a6ba2b9 commit c30a73b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

public/_headers

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# _headers 파일 내용
2+
3+
/*
4+
X-Content-Type-Options: nosniff
5+
X-Frame-Options: SAMEORIGIN
6+
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https:; font-src 'self' data: https:; connect-src 'self' https:; frame-ancestors 'self'
7+
Referrer-Policy: strict-origin-when-cross-origin
8+
9+
# CORS 정책 수정 - 모든 JSON 파일
10+
/page-data/*
11+
Access-Control-Allow-Origin: https://jhelper.jbnu.ac.kr
12+
13+
/app-data.json
14+
Access-Control-Allow-Origin: https://jhelper.jbnu.ac.kr
15+
16+
/manifest.webmanifest
17+
Access-Control-Allow-Origin: https://jhelper.jbnu.ac.kr
18+
19+
# 캐시 제어 - 민감한 파일들
20+
/page-data/*
21+
Cache-Control: private, no-cache, no-store, must-revalidate
22+
Pragma: no-cache
23+
24+
/*.json
25+
Cache-Control: private, no-cache, no-store, must-revalidate
26+
Pragma: no-cache

static/_headers

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 모든 리소스에 최고 수준 보안 적용
2+
/*
3+
! Access-Control-Allow-Origin
4+
! Server
5+
X-Content-Type-Options: nosniff
6+
X-Frame-Options: DENY
7+
Referrer-Policy: no-referrer
8+
Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; img-src 'self' data:; font-src 'self' https://cdn.jsdelivr.net https://fonts.gstatic.com; connect-src 'self'; manifest-src 'self'; frame-ancestors 'none'; object-src 'none'; base-uri 'none'; form-action 'none'
9+
Permissions-Policy: geolocation=(), microphone=(), camera=(), payment=(), usb=(), magnetometer=(), gyroscope=(), fullscreen=(), sync-xhr=()
10+
Cross-Origin-Embedder-Policy: require-corp
11+
Cross-Origin-Opener-Policy: same-origin
12+
Cross-Origin-Resource-Policy: same-origin
13+
Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0
14+
Pragma: no-cache
15+
X-Robots-Tag: noindex, nofollow, nosnippet, noarchive

0 commit comments

Comments
 (0)