Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ISRIC
wsm.rest
Commits
6dc020b1
Commit
6dc020b1
authored
Jan 10, 2018
by
Luís de Sousa
Browse files
Applying CORS to all resources.
parent
ab15d311
Changes
1
Hide whitespace changes
Inline
Side-by-side
appWSM.py
View file @
6dc020b1
#https://github.com/humiaozuzu/awesome-flask
#https://github.com/humiaozuzu/awesome-flask
from
flask
import
Flask
,
make_response
from
flask
import
Flask
,
make_response
from
flask_restful
import
Api
from
flask_restful
import
Api
from
flask_cors
import
CORS
from
resources.meta
import
Monoliths
,
Monolith
,
MonolithRoot
from
resources.meta
import
Monoliths
,
Monolith
,
MonolithRoot
import
logging
,
os
.
path
import
logging
,
os
.
path
#from flask import Flask
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
CORS
(
app
,
resources
=
{
r
"/*"
:
{
'origins'
:
'*'
}})
api
=
Api
(
app
)
api
=
Api
(
app
)
basePath
=
os
.
path
.
dirname
(
__file__
)
basePath
=
os
.
path
.
dirname
(
__file__
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment