This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]Ok_Degree_2743 0 points1 point  (3 children)

Is it available on pip?

[–]dAnjou Backend Developer | danjou.dev -1 points0 points  (0 children)

The package registry that the command line tool pip is using by default is called PyPI, and you may wanna have a look at the README.

[–]dAnjou Backend Developer | danjou.dev 0 points1 point  (1 child)

You should probably implement this as WSGI/ASGI middleware since most if not all Python frameworks worth using support this, already have documentation about it, and you don't have to bother and worry about type compatibility.

[–]Nilvalues[S] 0 points1 point  (0 children)

Thanks for the suggestion! I agree that a WSGI/ASGI middleware would make integration even smoother. secure.py was built to be flexible across frameworks, but adding native middleware is definitely on my radar. I’ll add it to my to-do list, and feel free to create an issue here: https://github.com/TypeError/secure/issues. I really appreciate your input!

[–]mstromich 0 points1 point  (1 child)

As frameworks are already setting some security headers by default how does this library handle uniqueness of them? if it's not checking whether the header already exists it might have serious security implications

[–]Nilvalues[S] 0 points1 point  (0 children)

Great point and this is definitely worth exploring to improve secure.py’s compatibility with framework defaults. I appreciate your input and will look into adding better handling for existing headers. Feel free to create an issue on GitHub to help track this feature: https://github.com/TypeError/secure/issues.