unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

Route rules by method, specially for proxy requests #2677

Open geminigeek opened 1 month ago

geminigeek commented 1 month ago

Describe the feature

Hi, I have an endpoint I want to proxy to another api, I only want to proxy GET requests, currently there is no way it can be done , if there is a way kindly point me.

Having a method in proxy route rules will help in moving access logic from remote backend to nuxt/ nitro endpoint

Additional information

geminigeek commented 1 month ago

this request is similar to this https://github.com/unjs/nitro/issues/2668 , i am not sure if it applies to proxy request also, i reopened it close this if they are same