screenshot-to-code
screenshot-to-code copied to clipboard
have to wss ?
Error reading filesSecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
Where are you getting this error? You shouldn't be doing wss if you're running this locally.
I started running directly in github's codespaces, using docker compose,You can go directly to https://curly-fortnight-vwqv456759p36xwj-5173.app.github.dev/
“I am using it on the server, so I also encountered this problem. How can I solve it?”
index-0b095b1d.js:225 Mixed Content: The page at 'https://XXX.XXX.XXX/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://stc.wenqian.space/generate-code'. This request has been blocked; this endpoint must be available over WSS.
@etfromchina you need to configure the environment variable in the frontend/.env.local
VITE_WS_BACKEND_URL=wss://stc.wenqian.space
Closing this since the solutions suggested above should work for people.