How to properly run local dev server using ssl

I configured my local dev server to use https like so:
devServer: {
host: 'app.local',
https: {
cert: './.certs/app.local.pem',
key: './.certs/app.local-key.pem',
},
},
devServer: {
host: 'app.local',
https: {
cert: './.certs/app.local.pem',
key: './.certs/app.local-key.pem',
},
},
Im now able to access my app locally using: https://app.local However, on the server, why does this return http?
export default defineEventHandler((event) => {
const redirectUrl = getRequestURL(event)

console.log('protocol', redirectUrl.protocol) // <-- 'http'
return
})
export default defineEventHandler((event) => {
const redirectUrl = getRequestURL(event)

console.log('protocol', redirectUrl.protocol) // <-- 'http'
return
})
Am I missing something?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server