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 support for exact paths when specified as locations #197

Merged
merged 6 commits into from
Mar 22, 2019

Conversation

lw346
Copy link
Contributor

@lw346 lw346 commented Mar 14, 2019

Goes some way to resolving #192.

Right now, if an ingress specifies a path of e.g. /my/test/path, this will be rendered in the location block as location /my/test/path/. If a browser then hits /my/test/path it will be redirected to /my/test/path/ with a 301 permanent redirect.

If /my/test/path is not a directory, but is instead an absolute path to a resource, then redirecting to /my/test/path/ simply doesn't make sense. This PR introduces the concept of "exact paths" by allowing ingresses to specify if all of their paths are absolute paths to resources. If so, we render the path as location = <raw path value>.

@lw346 lw346 added the review label Mar 14, 2019
@howardburgess howardburgess self-assigned this Mar 18, 2019
Copy link
Contributor

@howardburgess howardburgess left a comment

Choose a reason for hiding this comment

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

LGTM. Just a small typo in the help text.

cmd/feed-ingress/main.go Outdated Show resolved Hide resolved
@howardburgess howardburgess assigned lw346 and unassigned howardburgess Mar 18, 2019
@alangibson01 alangibson01 assigned howardburgess and unassigned lw346 Mar 19, 2019
howardburgess
howardburgess previously approved these changes Mar 19, 2019
@alangibson01
Copy link
Contributor

@howardburgess I've done one more commit to add an entry to the CHANGELOG. Could you take another look, please?

I rebased from master in order to pick up an entry in the CHANGELOG that was merged to master earlier this week, after this branch was taken.

howardburgess
howardburgess previously approved these changes Mar 21, 2019
@alangibson01
Copy link
Contributor

Sorry, @howardburgess, one more time please - I messed up the version number in the changelog.

Copy link
Contributor

@howardburgess howardburgess left a comment

Choose a reason for hiding this comment

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

Hehe no problem :)

@alangibson01 alangibson01 merged commit b56c00f into master Mar 22, 2019
@alangibson01 alangibson01 deleted the add-support-for-exact-paths branch March 22, 2019 10:12
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

Successfully merging this pull request may close these issues.

3 participants