Add CORS configuration
This commit is contained in:
parent
02096d66a4
commit
9a6df51d76
@ -11,7 +11,10 @@ session_opts = {
|
||||
'session.auto': True
|
||||
}
|
||||
|
||||
# cors
|
||||
def enable_cors():
|
||||
response.headers['Access-Control-Allow-Origin' ] = '*'
|
||||
response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'
|
||||
response.headers['Access-Control-Allow-Headers'] = 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token, Authorization'
|
||||
|
||||
# error page 403
|
||||
# error page 404
|
||||
|
Loading…
Reference in New Issue
Block a user