Skip to content

Commit

Permalink
Merge pull request #118 from HarryKodden/main
Browse files Browse the repository at this point in the history
make RP aware of running behind ssl terminating front end proxy
  • Loading branch information
rohe authored Jan 24, 2025
2 parents 2335ecd + 1530688 commit 82b6e8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/flask_rp/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from idpyoidc.configure import create_from_config_file
from idpyoidc.ssl_context import create_context

from werkzeug.middleware.proxy_fix import ProxyFix

try:
from . import application
except ImportError:
Expand All @@ -25,6 +27,10 @@
filename=conf)

app = application.oidc_provider_init_app(_config.rp, name, template_folder=template_dir)

app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1)


_web_conf = _config.web_conf
context = create_context(dir_path, _web_conf)

Expand Down

0 comments on commit 82b6e8f

Please sign in to comment.