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

No support for "https" in self links possible if Katharsis runs behind a reverse proxy #452

Open
wklenk opened this issue Sep 28, 2017 · 0 comments

Comments

@wklenk
Copy link

wklenk commented Sep 28, 2017

The situation is that Katharsis runs in a web service that is placed inside the company network and behind a reverse proxy. The reverse proxy is responsible to terminate the TLS connections, so the communication in the company network is HTTP only. When the reverse proxy calls the web service, I can make sure that the "Host" header field in the HTTP request is set to the value I want to see in the "self" links. However, as the "internal" communication in the company network is HTTP only, Katharsis creates only "self" links with "http" as URL scheme.

Could you please allow to overwrite this scheme, preferable by evaluating the header field X-Forwarded-Proto ?

The source of all evil is in file KatharsisRegistryConfiguration.java:

public String getUrl() {
                String scheme = request.getScheme();
                String host = request.getHeader("host");
                return scheme + "://" + host + pathPrefix;
            }

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

No branches or pull requests

1 participant