Comments (2)
rocky
relies on router
package for HTTP traffic routing.
Please, pass the middleware as variadic parameters using spread syntax instead, such as:
proxy[method](route, ...middlewares).forward('http://localhost:3001');
See supported route interface:
https://github.com/pillarjs/router#routermethodpath-middleware-handler
from rocky.
@tomas-fp Thanks for replying. Actually router
package accepts middleware in either format, see here:
var callbacks = flatten(slice.call(arguments))
I originally wrote it with spread operator but the behavior persists.
However, you pointed me in the right direction:
// append automatic head
if (this.methods.get && !this.methods.head) {
methods.push('head')
}
So this is the behavior that makes the HEAD
middleware get ignored if it's defined after the GET
.
from rocky.
Related Issues (20)
- Support for Additional HTTP Methods HOT 1
- Using 'body-parser' middleware causes TypeError HOT 3
- How to update load balance ? HOT 3
- for multipart file or large body pay load 'useForward' is making request to fail when some async task needs to be done like fetching data from some api. HOT 5
- can we have one more option for method ? HOT 2
- how to achieve app level load balancing? HOT 8
- Changing request URL randomly fails to get any response
- Can we have middleware to support custom load-balancing? HOT 3
- websocket middleware usage and examples needed, eg sniffing HOT 2
- custom load balancer support HOT 5
- How to access upstream response's statusCode in response middleware callbacks? HOT 2
- Test http2 support
- Request cloning breaks HTTP agents
- transformRequest has a gotcha, docs or code fix?
- Rocky breaks if domains has no registered A DNS records HOT 3
- Release security patch to npm HOT 1
- Rocky not working on node@16 HOT 2
- Forwarding with Express integration not working HOT 4
- Remove built-in retry support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocky.