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

404 instead of 307 redirecting to /ui/ #6656

Closed
schmichael opened this issue Nov 8, 2019 · 1 comment · Fixed by #6658
Closed

404 instead of 307 redirecting to /ui/ #6656

schmichael opened this issue Nov 8, 2019 · 1 comment · Fixed by #6658
Assignees
Labels
theme/api HTTP API and SDK issues type/bug
Milestone

Comments

@schmichael
Copy link
Member

Nomad version: 0.10.1 (but has been around for many releases)

Instead of returning a 404 Not Found for unknown URLs, Nomad returns a 307 Temporary Redirect to /ui/:

$ curl -v localhost:4646/asdf
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 4646 (#0)
> GET /asdf HTTP/1.1
> Host: localhost:4646
> User-Agent: curl/7.61.0
> Accept: */*
>
< HTTP/1.1 307 Temporary Redirect
< Content-Type: text/html; charset=utf-8
< Location: /ui/
< Vary: Accept-Encoding
< Date: Fri, 08 Nov 2019 18:34:47 GMT
< Content-Length: 40
<
<a href="/ui/">Temporary Redirect</a>.

* Connection #0 to host localhost left intact


$ curl -v localhost:4646/v1/asdf
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 4646 (#0)
> GET /v1/asdf HTTP/1.1
> Host: localhost:4646
> User-Agent: curl/7.61.0
> Accept: */*
>
< HTTP/1.1 307 Temporary Redirect
< Content-Type: text/html; charset=utf-8
< Location: /ui/
< Vary: Accept-Encoding
< Date: Fri, 08 Nov 2019 18:36:55 GMT
< Content-Length: 40
<
<a href="/ui/">Temporary Redirect</a>.

In some cases a 307 Moved Permanently is returned.

Fix

Nomad should return a 404 Not Found error for incorrect URLs and only / should redirect to /ui/.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/api HTTP API and SDK issues type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants