Remove Access-Control-Allow-Origin

I don't think it's any useful without Access-Control-Allow-Methods anyway.
This commit is contained in:
Gabriel Corona 2018-10-11 22:52:11 +02:00
parent d5107e3cdb
commit 99218216f0

View file

@ -681,13 +681,6 @@ class Interface(BaseInterface):
# TODO: Return OK to 'OPTIONS' xhr requests (l173) # TODO: Return OK to 'OPTIONS' xhr requests (l173)
app = Bottle(autojson=True) 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 # Attempt to retrieve and set locale
def api18n(callback): def api18n(callback):
try: try:
@ -698,7 +691,6 @@ class Interface(BaseInterface):
return callback return callback
# Install plugins # Install plugins
app.install(apiheader)
app.install(api18n) app.install(api18n)
app.install(_ActionsMapPlugin(actionsmap, use_websocket, log_queues)) app.install(_ActionsMapPlugin(actionsmap, use_websocket, log_queues))