Browse Source

Remove 'null' special case

Ben Vinegar 7 years ago
parent
commit
4f65bdd2d9
1 changed files with 1 additions and 10 deletions
  1. 1 10
      src/sentry/web/api.py

+ 1 - 10
src/sentry/web/api.py

@@ -229,16 +229,7 @@ class APIView(BaseView):
             )
 
         if origin:
-            if origin == 'null':
-                # If an Origin is `null`, but we got this far, that means
-                # we've gotten past our CORS check for some reason. But the
-                # problem is that we can't return "null" as a valid response
-                # to `Access-Control-Allow-Origin` and we don't have another
-                # value to work with, so just allow '*' since they've gotten
-                # this far.
-                response['Access-Control-Allow-Origin'] = 'null'
-            else:
-                response['Access-Control-Allow-Origin'] = origin
+            response['Access-Control-Allow-Origin'] = origin
 
         return response