Open lastcmaster opened 4 weeks ago
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.
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 `