Skip to content

Commit

Permalink
Merge pull request #147 from Ong-gi-Jong-gi/feat/auth
Browse files Browse the repository at this point in the history
[setting] 로컬 / 배포 환경에 따라 https 환경 설정 분기 처리
  • Loading branch information
SangWoo9734 authored Aug 25, 2024
2 parents b5b2d6d + 38ecb08 commit 5d21bba
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ export default defineConfig({
server: {
host: '0.0.0.0',
port: 5173,
https: {
key: fs.readFileSync(path.resolve('./cert', 'localhost-key.pem')),
cert: fs.readFileSync(path.resolve('./cert', 'localhost.pem')),
},
https:
process.env.VITE_MODE === 'production'
? {}
: {
key: fs.readFileSync(path.resolve('./cert', 'localhost-key.pem')),
cert: fs.readFileSync(path.resolve('./cert', 'localhost.pem')),
},
},
define: {
global: {},
Expand Down

0 comments on commit 5d21bba

Please sign in to comment.