-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Have any of you had issues with web sockets when deployed on cf?
I've been getting:
WebSocket connection to 'wss://iaa-mvp.18f.gov/sockjs/820/8st6qt8v/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400
So I read on StackOverflow that I need to set the DDP_DEFAULT_CONNECTION_URL to use port 4443. I did that (DDP_DEFAULT_CONNECTION_URL: ddp+sockjs://iaa-mvp.18f.gov:4443/sockjs), and then I got a CORS error.
I added
WebApp.connectHandlers.use(function(req, res, next) {
res.setHeader("Access-Control-Allow-Origin", "*");
return next();
});to the isServer block, but I'm still getting the same CORS error from before (from Chrome Dev Tools):
XMLHttpRequest cannot load https://iaa-mvp.18f.gov:4443/sockjs/info?cb=5kzx7yu53l. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://iaa-mvp.18f.gov' is therefore not allowed access.
Any help or guidance here would be great.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels