Skip to content

Commit

Permalink
Update extension.py to clean request.path before logging it (#351)
Browse files Browse the repository at this point in the history
* Update extension.py to use string format specifier for cleaning request.path
  • Loading branch information
aneshujevic committed May 4, 2024
1 parent cadade9 commit 6172c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_cors/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def cors_after_request(resp):
normalized_path = unquote_plus(request.path)
for res_regex, res_options in resources:
if try_match(normalized_path, res_regex):
LOG.debug("Request to '%s' matches CORS resource '%s'. Using options: %s",
LOG.debug("Request to '%r' matches CORS resource '%s'. Using options: %s",
request.path, get_regexp_pattern(res_regex), res_options)
set_cors_headers(resp, res_options)
break
Expand Down

0 comments on commit 6172c20

Please sign in to comment.