-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.py
33 lines (29 loc) · 876 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from mammothflaskblog import create_app
from flask_talisman import Talisman
csp = {
'default-src': ['\'self\'',
'*.facebook.com',
'*.facebook.net',
'*.twitter.com',
'*.bootstrapcdn.com',
'*.jquery.com',
],
'script-src': ['\'self\'',
'*.facebook.com',
'*.facebook.net',
'*.twitter.com',
'*.bootstrapcdn.com',
'*.jquery.com',
'*.cloudflare.com']
}
app = create_app()
talisman = Talisman(app,
content_security_policy=csp,
content_security_policy_nonce_in=['script-src']
)
if __name__ == '__main__':
app.run(
host="127.0.0.1",
port=5001,
threaded=True,
debug=True)