From 99218216f0429fbb3bd3929c9eb912694e6f9ce1 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 11 Oct 2018 22:52:11 +0200 Subject: [PATCH] Remove Access-Control-Allow-Origin I don't think it's any useful without Access-Control-Allow-Methods anyway. --- moulinette/interfaces/api.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/moulinette/interfaces/api.py b/moulinette/interfaces/api.py index 5d96af98..30eb3c41 100644 --- a/moulinette/interfaces/api.py +++ b/moulinette/interfaces/api.py @@ -681,13 +681,6 @@ class Interface(BaseInterface): # TODO: Return OK to 'OPTIONS' xhr requests (l173) app = Bottle(autojson=True) - # Wrapper which sets proper header - def apiheader(callback): - def wrapper(*args, **kwargs): - response.set_header('Access-Control-Allow-Origin', '*') - return callback(*args, **kwargs) - return wrapper - # Attempt to retrieve and set locale def api18n(callback): try: @@ -698,7 +691,6 @@ class Interface(BaseInterface): return callback # Install plugins - app.install(apiheader) app.install(api18n) app.install(_ActionsMapPlugin(actionsmap, use_websocket, log_queues))