Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-route all traffic to alias domain name through URL rewriting #5

Closed
giannifiore opened this issue Jan 12, 2022 · 2 comments
Closed
Assignees

Comments

@giannifiore
Copy link
Member

giannifiore commented Jan 12, 2022

Refer to https://github.com/rebrandly/rebrandly-express/wiki/URL-rewriting-and-alias-domains

User Stories

As a Rebrandly developer,
I need the middleware to accept an alias domain name as input during its setup,
So that I can assume the alias domain name is always known at runtime

As a Rebrandly developer,
I need the middleware to re-write the incoming HTTP request following a set of rewriting rules,
So that I can make sure there is a testable module specific to URL rewriting

Acceptance Tests

Given a server running on domain acme.com
Given that acme.com was added as an alias domain in Rebrandly
Given that the alias of acme.com is xyzxyzxyz.rebrandly.cc

Given that there is no matching route for /promo
When the server running at acme.com processes https://acme.com/promo URL
Then the response is a 302 Temporary Redirect to URL https://xyzxyzxyz.rebrandly.cc/promo
When the server running at acme.com processes http://acme.com/promo URL
Then the response is a 302 Temporary Redirect to URL https://xyzxyzxyz.rebrandly.cc/promo
When the server running at acme.com processes https://acme.com/promo?super=true URL
Then the response is a 302 Temporary Redirect to URL https://xyzxyzxyz.rebrandly.cc/promo?super=true

@giannifiore giannifiore added this to the Working prototype milestone Jan 12, 2022
@giannifiore giannifiore changed the title WIP: Re-route all traffic to alias domain name WIP: Re-route all traffic to alias domain name through URL rewriting Jan 12, 2022
@giannifiore giannifiore changed the title WIP: Re-route all traffic to alias domain name through URL rewriting Re-route all traffic to alias domain name through URL rewriting Jan 12, 2022
@rebrandly-dev rebrandly-dev self-assigned this Jan 14, 2022
@giannifiore
Copy link
Member Author

working on it on branch url-rewriting

@giannifiore
Copy link
Member Author

removed requirement of preserving "#querystring", because this value wouldn't reach server side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants