You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix system proxy endpoint forwarding query params (#2245)
DEFRA/water-abstraction-team#54https://eaflood.atlassian.net/browse/WATER-3787
In a previous change we [Create system proxy endpoint](#2229). We need this to be able to send requests to the [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system) when using our AWS environments.
That all seemed to work until we changed an endpoint in **water-abstraction-system** to require a query param to be passed through. Our proxy isn't doing this so now **water-abstraction-system** errors because of the missing param.
This change fixes the issue by switching to [h2o2](https://github.com/hapijs/h2o2) which "adds proxying functionality to a hapi server."
When we first implemented our proxy, we did it ourselves. The issue with the query params would require us to continue to expand that functionality, and we haven't even got to `POST`, `PUT` and `DELETE` requests yet!
So, before we went down that route we investigated what options were available and found this plugin. The documentation and current examples all direct you to use this if you need Hapi to act like a reverse/pass-through proxy server.
We should have done this from the outset, but we've at least stopped before we expanded our own functionality further.
0 commit comments