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

Implement rewriting without regex expression (for example: (.*) on line end) #3

Closed
ernado-x opened this issue Jul 1, 2013 · 5 comments
Labels

Comments

@ernado-x
Copy link

ernado-x commented Jul 1, 2013

When we have
"routes": {
"Test1": {
"url": "/Test-0/GetPersons",
"rewrite": "/api/Test/GetPersons",
"host": "10.13.125.167",
"port": 81
}
}

//Test1 /Test-0/GetPersons(.) /api/Test/GetPersons 10.13.125.167 81
the rewrite engine not accept url, but when we change "url" option to "url": "/Test-0/GetPersons(.
)" then all works fine.

Can you implement simple syntax when we not need (.*) at end of url.

@tshemsedinov
Copy link
Member

Ok, but give me real example where it is needed, this example have no sense, it maps one url to one route, if we do so, config file will turns into list of hundred urls. I'll advise to do it in two following ways instead:

routes: {
Test1: {
url: "/Test-0/(.*)",
rewrite: "/api/Test/[1]",
host: "10.13.125.167",
port: 81
}
}

or so:

routes: {
Test1: {
url: "/Test-0/(GetPersons)",
rewrite: "/api/Test/[1]",
host: "10.13.125.167",
port: 81
}
}

@eagleeye
Copy link

eagleeye commented Jul 1, 2013

i know that example above can be made by simple regexp, but framework should provide ability to do stupid routes also

@ernado-x
Copy link
Author

ernado-x commented Jul 1, 2013

Point of this discussion is to give Eeagleeye ability to create tool for very simple url-route administration. When end user not need to know regexp and he only use tool, but not write expressions.

But now he cannot do this without framework support. Or I'm not quite right?

@tshemsedinov
Copy link
Member

Fixed

tshemsedinov added a commit that referenced this issue Aug 12, 2014
Cumulated stable updates from "plugins" branch #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants