Skip to content

Commit

Permalink
add csp rules
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyguitar committed Sep 13, 2018
1 parent 02348c3 commit ce253de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ def find_key(token):


csp = {
"default-src": ["'self'", "github.com", "*.readthedocs.org"],
"default-src": "'none'",
"style-src": ["'self'", "unsafe-inline", "'unsafe-inline'"],
"script-src": [
"'self'",
"*.cloudflare.com",
"'unsafe-inline'",
"'unsafe-eval'",
],
"form-action": "'self'",
"base-uri": "'self'",
"img-src": "*",
"frame-src": "ghbtns.com",
"frame-ancestors": "'none'",
"object-src": "'none'",
}
app = Flask(__name__)
app.config["SECRET_KEY"] = os.urandom(16)
Expand Down

0 comments on commit ce253de

Please sign in to comment.