문제 상황
- 배포가 잘 됐는데 http 주소는 보안 이슈로 크롬에서 웹캠 사용을 금지
시도1. 크롬 브라우저 flag 설정 변경
- 크롬 flag 설정으로 임시 해결했으나 사용자가 모두 크롬 설정을 바꿔야한다는 애로사항있음
Enabling the Microphone/Camera in Chrome for (Local) Unsecure Origins
Chrome’s security policy will only allow you to access your device’s microphone/camera when the site’s origin is on https or is called…
medium.com
시도 2. 백엔드 서버에 HTTPS 적용
결론부터 설명하자면 방법4. Nginx로 리버스 프록시 설정 하는 방법을 사용했다.
방법 1. letsencrypt와 certbot을 이용하여 nginx 에 ssl 적용
https://velog.io/@jsl0149/NGINX%EB%A1%9C-HTTPS-%EB%B0%B0%ED%8F%AC%ED%95%98%EA%B8%B0
NGINX로 HTTPS 배포하기
letsencrypt, certbot을 이용한 인증서 발급
velog.io
방법 2. 직접 openssl을 활용하여 인증서 발급 후 설정
https://freestrokes.tistory.com/154
Node.js HTTPS 설정하기
Node.js HTTPS 설정하기 SSL 인증서를 이용하여 Node.js 서버에 HTTPS를 설정하는 방법에 대해 알아보겠습니다. 주로 사용하는 인증서의 파일 포맷에는 여러 종류가 있는데 정리하면 다음과 같습니다. .p
freestrokes.tistory.com
- 블로그에서 안내하는 brew 설치까진 완료
https://www.how2shout.com/linux/how-to-install-brew-ubuntu-20-04-lts-linux/
How to install Brew on Ubuntu 20.04 LTS Linux
Command to install and uninstall HomeBrew on Ubuntu 20.04 or 18.04 LTS Linux including CentOS, Linux Mint, OpenSUSE and more...
www.how2shout.com
- root.crt, root.key 파일 위치를 인식하지 못하는 문제 발생
- https://도메인 으로 접근은 완료
방법3. npm mcert 패키지 활용해서 적용
https://www.npmjs.com/package/mkcert
mkcert
Create Self Signed Development Certificates. Latest version: 1.5.1, last published: 7 months ago. Start using mkcert in your project by running `npm i mkcert`. There are 38 other projects in the npm registry using mkcert.
www.npmjs.com
다른 서버는 Python으로 작성되어 있기 때문에 패키지 사용 불가
방법4. Nginx로 리버스 프록시 설정하기
'Backend' 카테고리의 다른 글
[프로젝트] 블로그 만들기 #1. 초기 환경 설정 및 깃 허브 설정 (0) | 2023.08.23 |
---|---|
[SpringBoot] 반갑다! 봄! (0) | 2023.04.14 |
[Nginx] https 설정 (0) | 2022.07.01 |
[Docker] 도커 시작하기 (0) | 2022.06.30 |
[Node.js] Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client (0) | 2022.06.29 |