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 9 commits into from Jul 25, 2016


None yet
2 participants

dennisoelkers commented Jul 22, 2016

This loads the web interface resources in the REST API service if the rest_listen_uri and web_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 a text/html response are redirected to web_listen_uri if REST and web are running on the same port. The behavior stays the same for JSON requests.

@dennisoelkers dennisoelkers force-pushed the rest-and-web-on-same-port branch from b31be88 to 2b44e60 Jul 25, 2016

@@ -428,6 +443,32 @@ public void validateWebTlsConfig() throws ValidationException {
public void validateRestAndWebListenConfigConflict() throws ValidationException {

This comment has been minimized.


joschi Jul 25, 2016


+1 for different validator methods. ❤️

This comment has been minimized.


dennisoelkers Jul 25, 2016


+1 for implementing them in the first place ❤️

dennisoelkers and others added some commits Jul 25, 2016

Removing WWW-Authenticate header if requested with XMLHttpRequest.
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.

This comment has been minimized.


joschi commented Jul 25, 2016


@joschi joschi merged commit c5381f6 into master Jul 25, 2016

2 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build is in progress
ci-server-integration Jenkins build graylog2-server-integration-pr 1151 has succeeded
ci-web-linter Jenkins build graylog-pr-linter-check 636 has succeeded

@joschi joschi deleted the rest-and-web-on-same-port branch Jul 25, 2016

jalogisch added a commit to Graylog2/documentation that referenced this pull request Jul 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment