Add ROUTE_PREFIX parameter for working with reverse proxies. (#256)

* Add ROUTE_PREFIX parameter for working with reverse proxies.

* [flake8/E304] remove blank line after function decoder

* Add APPLICATION_ROOT and use route_prefix in requests.

* [black/code-styling] use double quotes instead of single.

* handle right events url depending route path

* properly handle redirects

* [flake8] remove unused module, fix styling issues

Co-authored-by: Henning Jacobs <henning@jacobs1.de>
This commit is contained in:
Khachatur Ashotyan
2020-08-23 17:27:34 +04:00
committed by GitHub
parent 3c6056dac3
commit 89c143d3aa
5 changed files with 25 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kubernetes Operational View {{ version }}</title>
<link rel="shortcut icon" href="static/favicon.ico">
<link rel="shortcut icon" href="{{ route_prefix }}static/favicon.ico">
<style>* {padding: 0; margin: 0} body { color: #aaaaff; background: #000; }</style>
<style>
/* latin */
@@ -14,7 +14,7 @@
font-weight: 400;
/* ShareTechMono-Regular.ttf: Copyright (c) 2012, Carrois Type Design, Ralph du Carrois (www.carrois.com post@carrois.com), with Reserved Font Name 'Share'
License: SIL Open Font License, 1.1 */
src: local('Share Tech Mono'), local('ShareTechMono-Regular'), url(static/sharetechmono.woff2) format('woff2');
src: local('Share Tech Mono'), local('ShareTechMono-Regular'), url({{ route_prefix }}static/sharetechmono.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
</style>
@@ -22,7 +22,7 @@
<body>
<!-- make sure the font is loaded -->
<div id="loading" style="font-family: ShareTechMono">Loading..</div>
<script src="static/build/{{ app_js }}"></script>
<script src="{{ route_prefix }}static/build/{{ app_js }}"></script>
<script>document.getElementById('loading').style.display = 'none'; const app = new App({{ app_config_json|safe }}); app.run()</script>
</body>
</html>

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Screen Tokens</title>
<link rel="shortcut icon" href="static/favicon.ico">
<link rel="shortcut icon" href="{{ route_prefix }}static/favicon.ico">
</head>
<body>
<h1>Screen Tokens</h1>