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
I'm trying to set up a proxy for my application, and I'm looking for a way to proxy all requests with query parameters. Specifically, I want to redirect requests from http://localhost:3000/foo to http://myapi.com/bar, including any query parameters present in the original request.
I've explored the Proxy middleware, but I couldn't find explicit documentation on how to handle query parameters during the proxy.
Here's an example to illustrate what I'm aiming for:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Fiber community,
I'm trying to set up a proxy for my application, and I'm looking for a way to proxy all requests with query parameters. Specifically, I want to redirect requests from
http://localhost:3000/foo
tohttp://myapi.com/bar
, including any query parameters present in the original request.I've explored the Proxy middleware, but I couldn't find explicit documentation on how to handle query parameters during the proxy.
Here's an example to illustrate what I'm aiming for:
Original Request: http://localhost:3000/foo?firstName=John&lastName=Doe
Desired Proxy: http://myapi.com/bar?firstName=John&lastName=Doe
Does anyone have experience with achieving this in gofiber? Any guidance or code snippets would be greatly appreciated.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions