mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-08 16:28:12 +08:00
added support for GATEWAY_EXTRA_SCRIPTS
This commit is contained in:
@@ -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
|
||||
# ['https://www.googletagmanager.com/gtag/js?id=UA-123456-2',
|
||||
# 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]
|
||||
|
||||
Reference in New Issue
Block a user