0

I've read in this post (How to use TLS in Play!Framework WebSockets ("wss://")) that Play framework 2.x doesn't support Secure WebSocket. Someone suggests to use nginx proxy. I'm thinking about configuring Play to serve HTTPS (as described here: https://www.playframework.com/documentation/2.3.x/ConfiguringHttps). Would this work with a WSS client endpoint and is this a correct approach? Is there an alternative approach to nginx or https?

Community
  • 1
  • 1

2 Answers2

0

Yes, it does work i have tried it in play 2.1.4. Worked fine for me, but i have only tested it in google chrome and firefox.

Himanshu Goel
  • 574
  • 1
  • 8
  • 26
0

Yes, the right approach is to run Play configured to run https (-Dhttps.port=9443) and then you can use wss://

Tested on Windows and Play 2.2.x

jfuentes
  • 477
  • 5
  • 8
  • hi jfuentes, I tried using -Dhttps.port=9443, but I am getting the below warning message and the connection is getting closed immediately. Warning: Generated key with self signed certificate for HTTPS. This should NOT be used in production. – Jeberdson Abraham Feb 10 '20 at 08:23