개발 노트/Etc.
[Node] Express, helmet 라이브러리 ALLOW-FROM ALL
Joyce.Dev
2022. 2. 7. 12:46
반응형
Node 의 Helmet 라이브러리를 사용하는 경우 Iframe 으로 해당 서버에서 제공하는 페이지를 가져다 쓸 때, 페이지가 뜨지 않는 경우가 있다.
나의 경우 Hyperledger Explorer 에서 아래 소스코드를 수정하고 정상적으로 Iframe 으로 불러와졌다.
- explorer.getApp().use(helmet.frameguard({ action: 'SAMEORIGIN' }));
+ explorer.getApp().use(helmet.frameguard({action:"allowfrom",domain:"*"}));
반응형