Comments (9)
By changing original url, I mean ability to modify request path befor route matching
from actix-web.
Added App::filter(), it is possible to use different applications for different hosts.
from actix-web.
With virtual hosting support, do you mean routing for domains? If so, this is exactly something I need.
I'm a Rust novice, but with some mentoring and reviewing I would love to try to add this to Actix.
from actix-web.
i think this is two fold problem.
- we have to decide how to do routing for domains
- ability to change (rewrite) original url. for example, it would be helpful in case if we use actix app as a part of bigger application
i'll help with code and mentoring
from actix-web.
On the first point, maybe something like App::with_domain("foo.example.com")
and then you can add routes as usual?
I'm not sure I follow what you mean about the ability to change original url.
What would also be nice, is that for the server you can bind multiple SSL builders which will be server depending on the domain used.
from actix-web.
Let’s add App::filter()
similar to Route::filter()
then we can reuse predicates and domain could be just new type of predicate.
I don’t think it is possible to use different ssl connectors for one port and for different port you already can specify different ssl builders
from actix-web.
Thank you soo much! I love the work you are doing, let me know if there is anything else I can do.
from actix-web.
@fafhrd91 Isn't (2) already possible with ability to mutate match info and request URI in-place?
I ask since I tweaked your NormalizePath middleware and was able to strip a common prefix from the URL path then routed successfully on the updated URL path.
from actix-web.
The Host guard effectively provides this.
Further discussion should be in a new issue w.r.t. newer Actix Web versions
from actix-web.
Related Issues (20)
- Why is the code below why version 4 cannot access httpserver, but version 3 can? HOT 1
- awc CONNECT method support
- add Proxy-Connection header HOT 3
- Filter out completely impossible characters.
- Add macro for route handler accepting all HTTP methods HOT 13
- Compilation fails when using the latest version of rustls HOT 5
- Add pattern syntax for optional trailing slash
- [How to] Middleware `Response body` manipulation.
- Add support to be able to test the route tree using `match_pattern` and `match_name`. HOT 2
- Connecting to the database from an external network causes a spike in connections HOT 1
- actix-http: Compilation fails HOT 1
- Err(NoWebsocketUpgrade) HOT 1
- 在 c++开发中,使用ws进行请求。会因为路径上有中文而报错,In c++ development, using ws for requests will result in an error due to Chinese characters in the path. HOT 1
- 在 c++开发中,使用ws进行请求。会因为路径上有中文而报错,In c++ development, using ws for requests will result in an error due to Chinese characters in the path. HOT 1
- actix-web doesn't compile with rustls 0.23.1 HOT 3
- target mips-unknown-linux-musl compilation failed
- Unexpected routing HOT 1
- Seems like web::Json can't deserilize json with nested keys as payload inside requests into rust structs
- Unable to get app_data information in middleware HOT 1
- match_pattern/match_info/match_name may return incorrect values when using route guards
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 actix-web.