Where can I manually set the redirect_uri
that is part of the url parameters when clicking on sign in
in the default WireCloud setup?
We want to show our platform to the internet and need to address our WireCloud server via our proxy. The problem now is, that not the proxy url gets used as redirect url but the internal server url. This leads to the error {"state": "eCUfYmpXnDV34IVR1P8Vtt2Ke8Xhoxtm", "error": "mismatching_redirect_uri"} (HTTP 400)
.
Add the following lines into the settings.py
file:
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
this will configure WireCloud to trust the following headers: X-Forwarded-Host
, X-Forwarded-Port
and X-Forwarded-Proto
. These headers are usually provided by the proxy servers when calling the backend service.
If you prefer to no rely on these headers, you can set the specific values in the settings.py
file using the following settings instead:
FORCE_PROTO = 'https'
FORCE_DOMAIN = 'my.domain.com'
FORCE_PORT = 8000