Is your feature request related to a problem? Please describe.
I'm working on an OpenSearch Dashboard plugin where I need to handle the front-end requests on a different back-end server. Request: client ==> /server ==> /custom-backend.
I was using a BFF approach, redirecting every request manually, but it's been very painful and verbose.
Since the hapi.js server has a route proxy option, I'd like to propose exposing this proxy option as a method in the router interface. This way, we only need to set up the proxy endpoint and it will redirect every request to my backend service.
I considered turning my custom back-end public and sending the front-end requests directly to it, but, doing so, I would lose the integration with the Dashboard Security plugin that is handling authentication in my application.
Additional context
I forked the OpenSearch and worked out a solution. I'd like to share it with the community, and see if it would be a good feature for other people.
Is your feature request related to a problem? Please describe.
I'm working on an OpenSearch Dashboard plugin where I need to handle the front-end requests on a different back-end server. Request:
client ==> /server ==> /custom-backend
. I was using a BFF approach, redirecting every request manually, but it's been very painful and verbose.Describe the solution you'd like
Since the hapi.js server has a route proxy option, I'd like to propose exposing this proxy option as a method in the router interface. This way, we only need to set up the proxy endpoint and it will redirect every request to my backend service.
Describe alternatives you've considered
I considered turning my custom back-end public and sending the front-end requests directly to it, but, doing so, I would lose the integration with the Dashboard Security plugin that is handling authentication in my application.
Additional context
I forked the OpenSearch and worked out a solution. I'd like to share it with the community, and see if it would be a good feature for other people.