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?
Asked
Active
Viewed 1,158 times
2 Answers
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
-
My clients are routers. Initially Java clients to simulate them. Then I will use Linux and C. I hope it will work. Thanks. – Mattia Micomonaco Jun 11 '15 at 09:13
-
1I have onlly tried it on linux with java. If you face any issue please comment it here. I will try my best to solve it. – Himanshu Goel Jun 11 '15 at 09:16
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