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
Allowing to run REST API and web interface on same port. #2515
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dennisoelkers
added a commit
to Graylog2/documentation
that referenced
this pull request
Jul 25, 2016
This was referenced Jul 25, 2016
dennisoelkers
force-pushed
the
rest-and-web-on-same-port
branch
from
July 25, 2016 13:04
b31be88
to
2b44e60
Compare
@@ -428,6 +443,32 @@ public void validateWebTlsConfig() throws ValidationException { | |||
} | |||
} | |||
|
|||
@ValidatorMethod | |||
@SuppressWarnings("unused") | |||
public void validateRestAndWebListenConfigConflict() throws ValidationException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for different validator methods. ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for implementing them in the first place ❤️
This is adding a Jersey response filter that checks if: * the response is a 401 (Unauthorized) * the request was a XMLHttpRequest If this holds true, the `WWW-Authenticate`-header is removed, to prevent the browser's credentials dialog to pop up for an AJAX call.
LGTM. 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This loads the web interface resources in the REST API service if the
rest_listen_uri
andweb_listen_uri
configuration directives contain the same host and port. If this is the case, one of them also must have a different path prefix, the web interface path must be nonempty and different than/
.Additionally, requests going to
http://<graylog>:12900
expecting atext/html
response are redirected toweb_listen_uri
if REST and web are running on the same port. The behavior stays the same for JSON requests.