-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Why this is a good feature to have?
- This is for convenience, so that we don't have to install additional reverse proxies like Nginx, HAProxy etc.
- We usually use those for (1) reverse proxy and (2) static file serving. Xitrum is already good at (2), adding (1) will make Xitrum more complete.
Example:
Site X is written with Xitrum. It also needs to integrate Discourse. With this reverse proxy feature, we can mount Discourse at /forum of site X.
For now, we don't support request and response interception.
In the future, we can:
- Allow code to intercept requests and responses to modify (headers etc.) or extract info.
- Add
respondProxyfor actions.
How to implement?
- https://github.com/netty/netty/tree/4.1/example/src/main/java/io/netty/example/proxy
- For performance, we avoid parsing as much as possible. Probably we only need to (1) look at the first request line to know the URL and (2) inject proxy info headers to the request. We don't modify responses, just send them as-is.
Headers to set:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels