Skip to content

Commit

Permalink
TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanYoung committed May 23, 2022
1 parent 34b7fb8 commit a605b32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions csp/conf/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}


def _handle_legacy_settings(definitions, allow_legacy):
def _handle_legacy_settings(csp, allow_legacy):
"""
Custom defaults allow you to set values for csp directives
that will apply to all CSPs defined in CSP_DEFINITIONS, avoiding
Expand All @@ -44,7 +44,6 @@ def _handle_legacy_settings(definitions, allow_legacy):
LEGACY_SETTINGS_NAMES_DEPRECATION_WARNING % ', '.join(legacy_names),
DeprecationWarning,
)
csp = definitions["default"]
legacy_csp = (
setting_to_directive(name, value=getattr(settings, name))
for name in legacy_names if name not in csp
Expand Down
2 changes: 1 addition & 1 deletion csp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_declared_policy_definitions():
),
)
deprecation._handle_legacy_settings(
custom_definitions,
custom_definitions['default'],
allow_legacy=True # not hasattr(settings, 'CSP_POLICY_DEFINITIONS'),
)
definitions = csp_definitions_update(
Expand Down

0 comments on commit a605b32

Please sign in to comment.