diff --git a/bazarr/main.py b/bazarr/main.py index a84f54b2b..a9ef526e2 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -146,7 +146,8 @@ def post_get(name, default=''): @hook('before_request') def enable_cors(): - response.headers['Access-Control-Allow-Origin'] = '*' + if response: + response.headers['Access-Control-Allow-Origin'] = '*' @route(base_url + 'login')