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

Problem with path strip and prepend #948

Open
lastcmaster opened this issue Aug 14, 2024 · 1 comment
Open

Problem with path strip and prepend #948

lastcmaster opened this issue Aug 14, 2024 · 1 comment

Comments

@lastcmaster
Copy link

We can not get fabio to strip the only element in the URL, se example:
`
Target:
http://k8swork01.hi5.ismobile.com:8083/optimizer/optservlet

=================
Problem setup:

Consul tag:
urlprefix-optimizer.cloud.ismobile.com/sweden strip=/sweden prepend=/optimizer/optservlet

Extenal call:
https://optimizer.cloud.ismobile.com/sweden?sync&timeout=20

Expected:
POST /optimizer/optservlet?sync&timeout=20 HTTP/1.1
Host: optimizer.cloud.ismobile.com

Actual:
POST /optimizer/optservlet/sweden?sync&timeout=20 HTTP/1.1
Host: optimizer.cloud.ismobile.com

=================
Working setup:

Consul tag:
urlprefix-optimizer.cloud.ismobile.com/sweden strip=/sweden

Extenal call:
https://optimizer.cloud.ismobile.com/sweden/optimizer/optservlet?sync&timeout=20

Expected:
POST /optimizer/optservlet?sync&timeout=20 HTTP/1.1
Host: optimizer.cloud.ismobile.com

Actual:
POST /optimizer/optservlet?sync&timeout=20 HTTP/1.1
Host: optimizer.cloud.ismobile.com
`

@tristanmorgan
Copy link
Member

One thing to look at in the fabio logs is a line like:

+ route add optimizer optimizer.cloud.ismobile.com/sweden http://optimizer.cloud.ismobile.com/ opts "strip=/sweden prepend=/optimizer/optservlet"

this will test if the urlprefix- is getting parsed properly.

You can also test the functionality manually by adding lines in the Overrides of the UI.

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