Error message:
If we used Browser (Ex: Chrome) to call the API. In DevTools, it will show CORS error but actually it’s not.
If we call this API by Postman, it will show “504 timeout”.
We need to update Route setting to fix it.
Solution:
By default setting, OpenShift Route will close the connection after 30 secs if no response. But sometimes back-end server will need more time to deal with that.
In my case, our web-service will retrieve a lot of files to get data then response. So we changed the default setting.
Command:
oc annotate route <route_name> \ — overwrite haproxy.router.openshift.io/timeout=<timeout><time_unit>
Example:
oc annotate route wormhole-api — overwrite haproxy.router.openshift.io/timeout=30m