Lovable
deployment
Dev Server HTTPS Needed for Secure Features
Features requiring HTTPS (geolocation, service workers, secure cookies) don't work on localhost:5173. Browser blocks insecure context APIs. Need to test HTTPS-only features in development.
Development typically uses HTTP, but some APIs require HTTPS. Self-signed certificates enable local HTTPS testing.
Error Messages You Might See
Geolocation requires a secure context
Service Worker requires HTTPS
Notification.permission requires HTTPS
Common Causes
- Dev server only running HTTP, not HTTPS
- No local certificate for HTTPS
- Browser rejects self-signed certificate
- Unsupported feature from non-HTTPS context
- Mixed HTTP/HTTPS requests (mixed content)
How to Fix It
Configure HTTPS in vite.config.js:
import fs from 'fs';
export default {
server: {
https: {
key: fs.readFileSync('.cert/key.pem'),
cert: fs.readFileSync('.cert/cert.pem')
}
}
}Generate self-signed cert: mkcert localhost
Or use localhost.run or ngrok for public HTTPS tunnel.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get Help