-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add CSP handler setting #401
Add CSP handler setting #401
Conversation
@peppelinux How do you feel about the overall approach taken? |
65a28a7
to
40fa320
Compare
40fa320
to
0387327
Compare
Good feature, however this must be refactored: https://github.com/IdentityPython/djangosaml2/pull/401/files#diff-fcaad0de48c174c47b13c1ff9c42a101f319429573505b1120123d31bfe791c8R220 we have to reduce the nested if statements, I'll try to give some hints If time will permit, otherwise please do your refactoring proposals |
Not too sure what you meant by "nested if statements" as there was only a single level. I do agree that there was too much logic bundled together and have split it up a bit. I hope it is somewhat inline with what you were thinking. |
sorry for the late @GertBurger we can open an issue saying that a a further analysis for a code refactor can be made as well. at the current state the unit tests fails with py3.8 while djangosaml2 needs the support until the official eol of it and the decision of the idpy dev team. could you propose any workaround in this PR? |
ah yes, |
Fixes #397
This PR adds the
SAML_CSP_HANDLER
setting so that users can specify how CSP should be updated, if at all.The default behaviour of using
django-csp
remains the same.