It turned out that nginx was returning 301 while trying to redirect from http to https (it had nothing to do with the endpoint itself thankfully).
I changed my websocket URL to "wss://" + url and that seemed to resolve the issue for me.
For future readers, if you are still experiencing errors with a Secure WebSocket you may want to adjust the SSL configuration of the QWebSocket.
QSslConfiguration sslConfig; sslConfig.setProtocol(whateverProtocolYouDesire); // Set additional properties of sslConfig here... socket->setSslConfiguration(sslConfig);