mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-26 23:58:12 +08:00
Hooks for sentry integration (#1460)
* add sentry webpack plugin * allow override of webpack config * work around cheerio inability to parse jinga templates * webpack can not minify jinja templates * allow script injection to specify other attributes * allow script injection to specify other attributes * Adjustments to make plugin systems work * Add sourcemaps for javascript in prod webpack * Update .gitignore * Fix spelling errors Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
This commit is contained in:
co-authored by
Matt Weiden
parent
9026e0ce41
commit
c1bf491a96
+3
-1
@@ -28,7 +28,7 @@ build: clean
|
||||
if [ -f customize/requirements.txt ] ; then \
|
||||
pip install requirements-parser ; \
|
||||
pip install packaging ; \
|
||||
python check_requirements.py ../requirements.txt customize/requirements.txt; \
|
||||
python3 check_requirements.py ../requirements.txt customize/requirements.txt; \
|
||||
cp customize/requirements.txt artifact.dir; \
|
||||
fi ; \
|
||||
if [ -d customize/deploy ] ; then \
|
||||
@@ -36,6 +36,7 @@ build: clean
|
||||
fi; \
|
||||
if [ -d customize/inline_scripts ] ; then \
|
||||
cp -r customize/inline_scripts/* artifact.dir/server/common/web/templates; \
|
||||
find artifact.dir/server/common/web/templates/ -type f -exec sed -i$(if $(IS_DARWIN), '',) 's/__CELLXGENE_COMMIT__/$(CELLXGENE_COMMIT)/g' {} \;; \
|
||||
fi; \
|
||||
if [ -d customize/ebextensions ] ; then \
|
||||
cp -r customize/ebextensions/* artifact.dir/.ebextensions; \
|
||||
@@ -43,6 +44,7 @@ build: clean
|
||||
fi; \
|
||||
if [ -d customize/plugins ] ; then \
|
||||
cp -r customize/plugins artifact.dir/server/; \
|
||||
find artifact.dir/server/plugins/ -type f -exec sed -i$(if $(IS_DARWIN), '',) 's/__CELLXGENE_COMMIT__/$(CELLXGENE_COMMIT)/g' {} \;; \
|
||||
fi; \
|
||||
(cd artifact.dir; \
|
||||
cp -r server/common/web/static static; \
|
||||
|
||||
@@ -60,6 +60,7 @@ class WSGIServer(Server):
|
||||
script_hashes, style_hashes = WSGIServer.get_csp_hashes(app, app_config)
|
||||
csp = {
|
||||
"default-src": ["'self'"],
|
||||
"connect-src": ["'self'"],
|
||||
"script-src": ["'self'", "'unsafe-eval'", "'unsafe-inline'"] + script_hashes,
|
||||
"style-src": ["'self'", "'unsafe-inline'"] + style_hashes,
|
||||
"img-src": ["'self'", "data:"],
|
||||
|
||||
Reference in New Issue
Block a user