-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm following the doc for customization but I get an error:
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/app/app/main.py", line 33, in <module>
secure_headers.hsts.max_age(63072000) # Override the default max-age value
AttributeError: 'Secure' object has no attribute 'hsts'
Code:
from secure import Secure, Preset
secure_headers = Secure.from_preset(Preset.BASIC)
secure_headers.hsts.max_age(63072000) # Override the default max-age value
Metadata
Metadata
Assignees
Labels
No labels