IMGIITRoorkee / omniport-frontend

The React frontend of the one true portal for any and every educational institute
GNU General Public License v3.0
33 stars 16 forks source link

Proxy websockets in dev server #25

Open Ajayneethikannan opened 4 years ago

Ajayneethikannan commented 4 years ago

The issue is that,

  1. ws URLs are proxied as 'http://' URLs
  2. not able to proxy ws connections in development without external libraries such react.io-connect (which as far as I tested using long-polling)

Solutions for these would be great.

dhruvkb commented 4 years ago

Just wanted to ask if you are sure about this? My memory is a little foggy but iirc, @pradumangoyal and I were testing websockets (with "ping-pong") on my development server and it was working fine.

pradumangoyal commented 4 years ago

@dhruvkb I think that was django template-based. The one you made initially?

dhruvkb commented 4 years ago

Yeah the very first one. Was that made in Django templates?

Ajayneethikannan commented 4 years ago

I think maybe there is some issue in the webpack config 😅, I remember @algomaster99 facing some issues with WebSocket proxy while working on fac app publish

algomaster99 commented 4 years ago

@Ajayneethikannan yeah, I couldn't simply use /ws/do-something. Had to write the full absolute URL with ws:// mentioned.