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

Add basepath when redirecting from a trailling slash #8966

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Nov 4, 2016

Routes with a trailing slash are redirected with the trailing slash removed. These redirects were not including the server base path causing paths like /my_base_path/app/kibana/ -> /app/kibana

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@epixa
Copy link
Contributor

epixa commented Nov 5, 2016

Is basePath guaranteed to end in a /? What about if it's simply /?

@jbudz
Copy link
Member Author

jbudz commented Nov 7, 2016

There's some schema validation for it, it'll fail if it ends with a trailing / (or there is only a /)

basePath: Joi.string().default('').allow('').regex(/(^$|^\/.*[^\/]$)/, `start with a slash, don't end with one`),
.

@epixa epixa added the v4.7.0 label Nov 7, 2016
@jbudz jbudz merged commit 6236843 into elastic:master Nov 10, 2016
@epixa epixa added v5.0.1 and removed v5.0.2 labels Nov 10, 2016
elastic-jasper added a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
elastic-jasper added a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
elastic-jasper added a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
jbudz pushed a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
jbudz pushed a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
jbudz pushed a commit that referenced this pull request Nov 10, 2016
Backports PR #8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z
nreese pushed a commit to nreese/kibana that referenced this pull request Nov 10, 2016
@epixa epixa added v5.1.1 and removed v5.1.0 labels Dec 8, 2016
@epixa epixa added the v4.6.4 label Dec 20, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Backports PR elastic#8966

**Commit 1:**
Add basepath when redirecting from a trailling slash

* Original sha: 442bcb9
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2016-11-04T13:33:24Z

Former-commit-id: 321e7e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants