Socket Server with netty-socketio and Piesocket tester

54 views Asked by At

I am using netty-socketio to create a server on Android and using PieSocket to test connecting the server.But I get the error on PieSocket as below:

enter image description here

Ensure preflight responses are valid A cross-origin resource sharing (CORS) request was blocked because the response to the associated preflight request failed, had an unsuccessful HTTP status code, and/or was a redirect. To fix this issue, ensure all CORS preflight OPTIONS requests are answered with a successful HTTP status code (2xx) and do not redirect.

On the server, I have the connection from PieSocket, which means PieSocket has connected to the server. So how netty-socketio server treating this connection, like sending back any events or something else?

My Server Configs:

        private val socketServer: SocketIOServer by lazy {
        SocketIOServer(Configuration().apply {
            hostname = mHost
            port = mPort
            isAllowCustomRequests = true
        })
    }

Btw, I have used socket.io-client-java to test on an Android device, and it was successful.

0

There are 0 answers