-
Is there an example somewhere of how to use NGF to host websockets? I've been looking for one and can not find it. With NGINX Plus ingress controller we're using the following annotations, these are what I need to chase down the equivalent for... nginx.org/proxy-read-timeout: 200s Any examples or guidance would be wonderful and might help others as well. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @kbsquared, to set up HTTPS redirection, you can see an example using a You can then send a request with the "Upgrade: websocket" header set, which should allow traffic to be sent to your websocket service. If you also need to set other websocket headers like Timeouts are not yet supported in a native API policy, so you can use the SnippetsFilter API as a workaround for now. Let me know if this helps out! |
Beta Was this translation helpful? Give feedback.
Happy to help, and this type of feedback around use cases always helps us improve our documentation so we know what users need!
Regarding the snippets filter, I think you could define one as simply as:
and attach it to each HTTPRoute rule similar to the example in that guide. The idea behind the SnippetsFilter is basically giving the ability to inject literal nginx config into a specific place.