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

Include variables in url_prefix #381

Open
fchambo opened this issue Mar 8, 2016 · 0 comments
Open

Include variables in url_prefix #381

fchambo opened this issue Mar 8, 2016 · 0 comments

Comments

@fchambo
Copy link
Contributor

fchambo commented Mar 8, 2016

It would be great if we could make url_prefix a bit more dynamic.

I will try to explain my scenario, please ask for clarifications if necessary:

Sinopia server: available from http://mycompany.com/sinopia and http://10.1.1.1/sinopia via nginx.

Client A: it is inside Sinopia server's network (ip: 10.1.1.2) but it has no access to http://mycompany.com/sinopia due to firewall restrictions.

Client B: it is outside Sinopia server's network, so it has no access to 10.1.1.1, but it has access through http://mycompany.com/sinopia.

So, if I configure url_prefix: http://mycompany.com/sinopia, then Client A throws timeout because sinopia change links with mycompany.com host. And if I configure url_prefix: http://10.1.1.1/sinopia, then Client B throws timeout because sinopia change links with 10.1.1.1 host.

What I propose is to add the feature to add some simple variables to url_prefix so it would be possible to configure something like url_prefix: $scheme://$host:$port/sinopia

I think that with those 3 simple variables we open a big range of new configuration possibilities. I will be working on a pull request within this days, but I would also like to know your opinions on this new feature.

fchambo pushed a commit to fchambo/sinopia that referenced this issue Mar 17, 2016
fchambo pushed a commit to fchambo/sinopia that referenced this issue Mar 17, 2016
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

1 participant