GithubHelp home page GithubHelp logo

Comments (9)

fafhrd91 avatar fafhrd91 commented on May 6, 2024 1

By changing original url, I mean ability to modify request path befor route matching

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 6, 2024 1

Added App::filter(), it is possible to use different applications for different hosts.

from actix-web.

wunki avatar wunki commented on May 6, 2024

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.

fafhrd91 avatar fafhrd91 commented on May 6, 2024

i think this is two fold problem.

  1. we have to decide how to do routing for domains
  2. 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.

wunki avatar wunki commented on May 6, 2024

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.

fafhrd91 avatar fafhrd91 commented on May 6, 2024

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.

wunki avatar wunki commented on May 6, 2024

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.

leonbreedt avatar leonbreedt commented on May 6, 2024

@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.

robjtede avatar robjtede commented on May 6, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.