Skip to content

Commit

Permalink
update https readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed Sep 26, 2024
1 parent 57b04a1 commit 05b8c81
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# recommend to copy this file
# create `.env.development` for development: `npm run dev`
# create `.env.production` for production: `npm run build`
NEXT_PUBLIC_ENV=prod
NEXT_PUBLIC_ENV={local, dev, prod}

# only for local development
NODE_TLS_REJECT_UNAUTHORIZED=0
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: npm-run-lint
name: Run ESLint
entry: npm run lint
language: system
types: [javascript, jsx]
- id: npm-run-format
name: Run Prettier
entry: npm run format
language: system
types: [javascript, jsx]
14 changes: 14 additions & 0 deletions certificates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ Sudo password:
```

가이드 대로 본인의 root password를 입력하면, 루트 경로에 `certificates/`란 폴더에 `localhost-key.pem``localhost.pem`이 생성되고, NextJS app을 https로 실행할 수 있다.

## NODE_TLS_REJECT_UNAUTHORIZED

ENV에 요 값을 아래와 같이 세팅해야 한다.

```
NODE_TLS_REJECT_UNAUTHORIZED=0
```

그래야 self-signed cert를 사용해도 SSR과 API 요청을 할 수 있다.

## Chrome Allow Insecure Localhost

또, 크롬에서도 insecure localhost에 대한 접속을 허용해줘야 한다. `chrome://flags/#allow-insecure-localhost` 경로로 이동해서 해당 옵션을 Enabled로 바꾸자.

0 comments on commit 05b8c81

Please sign in to comment.