I am making a simple REST API based Express-React-Node-MySQL stack.
Architecture
- Client - React JS / Mui client files
- Server - Node - MySQL - Express framework
- Ubuntu
Network
- PORT 443 forwarding i.e. all requests made on https://myIp:443 or http://myIP:443 land to my home.
- Yes I have a domain i.e.
I am not using any websocket or socket io kind of thing, why is this error console message being triggered ? What am I doing wrong. PLZ tell :(
CodePudding user response:
This is a great question! Thanks for sharing
To the point: the docs clearly states that
The proxy option supports HTTP, HTTPS and WebSocket connections.
And also that:
If the proxy option is not flexible enough for you, alternatively you can:
Configure the proxy yourself
I know.. this is not such a great option but - using this option is production is not ideal either. Most chances that your app will be served via a real server or via API gateway with a fixed address or a valid domain
Also note that if you are using a secured connection you will also need to manage a valid certificate (or use a manage solution that will provide one)
In short: production and development have different configuration set, hence - in production you will use different config and this error will not be present. This error is likely generated only in development mode using this specific configuration
I hope that satisfy you as the rest of this answer will be more
devOpsregarding to production configuration rather than development guidelines
