Commit 15998beb authored by Alok Saldanha's avatar Alok Saldanha
Browse files

added support for GATEWAY_EXTRA_SCRIPTS

parent 6183a7ed
......@@ -14,6 +14,7 @@ cellxgene_data = os.environ.get("CELLXGENE_DATA")
gateway_host = os.environ.get("GATEWAY_HOST")
gateway_protocol = os.environ.get("GATEWAY_PROTOCOL")
ip = os.environ.get("GATEWAY_IP")
extra_scripts = os.environ.get("GATEWAY_EXTRA_SCRIPTS")
env_vars = {
"CELLXGENE_LOCATION": cellxgene_location,
......@@ -7,10 +7,11 @@
# OR CONDITIONS OF ANY KIND, either express or implied. See the License for
# the specific language governing permissions and limitations under the License.
from cellxgene_gateway import env
def get_extra_scripts():
# can be array of script tags to inject on every page, e.g. for google analytics could be
# ['',
# f"{env.gateway_protocol}://{env.gateway_host}/static/js/google_ua.js"]
# where google_ua.js is a script you add to the static/js folder prior to deployment.
return []
return [] if env.extra_scripts is None else [p.strip() for p in env.extra_scripts.split(",") if len(p.strip()) > 0]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment