summaryrefslogtreecommitdiffstats
path: root/templates/swagger/ui.tmpl
diff options
context:
space:
mode:
authorJakob Ackermann <das7pad@outlook.com>2019-10-22 14:11:01 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-10-22 20:11:01 +0800
commit00629fea95970e99ba5ef05954bbad0804805df6 (patch)
tree1590e0f7913c71689727cc17a3bf2786b43028ce /templates/swagger/ui.tmpl
parentd0c7a08d751bd068e557efe56683b999d29eb910 (diff)
downloadgitea-00629fea95970e99ba5ef05954bbad0804805df6.tar.gz
gitea-00629fea95970e99ba5ef05954bbad0804805df6.zip
[assets] configurable URL for static resources (#7911)
* static url * add cors support for static resources * [assets] work on the migration to configurable url for assets Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [misc] fix whitespace Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [assets] fix the loading of the manifest.json It is generated dynamically, and as such can not be served by the cdn. Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * Revert "add cors support for static resources" This reverts commit 42f964fd181dbb8b139808b9be623470d4f0e40f Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [docs] add the STATIC_URL_PREFIX option Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [docs] reverse-proxy: nginx: add two setups for STATIC_URL_PREFIX Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [assets] migrate the url of a new asset to the static url prefix REF: f2a3abc683ad4b2177b7c7c6160a2c0b4316120a Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
Diffstat (limited to 'templates/swagger/ui.tmpl')
-rw-r--r--templates/swagger/ui.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/swagger/ui.tmpl b/templates/swagger/ui.tmpl
index 20d4f7f63b..0125ee4a19 100644
--- a/templates/swagger/ui.tmpl
+++ b/templates/swagger/ui.tmpl
@@ -4,9 +4,9 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
- <link rel="stylesheet" type="text/css" href="{{AppSubUrl}}/vendor/assets/swagger-ui/swagger-ui.css" >
- <link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-32x32.png" sizes="32x32" />
- <link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-16x16.png" sizes="16x16" />
+ <link rel="stylesheet" type="text/css" href="{{StaticUrlPrefix}}/vendor/assets/swagger-ui/swagger-ui.css" >
+ <link rel="icon" type="image/png" href="{{StaticUrlPrefix}}/vendor/assets/swagger-ui/favicon-32x32.png" sizes="32x32" />
+ <link rel="icon" type="image/png" href="{{StaticUrlPrefix}}/vendor/assets/swagger-ui/favicon-16x16.png" sizes="16x16" />
<style>
html
{
@@ -65,8 +65,8 @@
<div id="swagger-ui"></div>
-<script src="{{AppSubUrl}}/vendor/assets/swagger-ui/swagger-ui-bundle.js"> </script>
-<script src="{{AppSubUrl}}/vendor/assets/swagger-ui/swagger-ui-standalone-preset.js"> </script>
+<script src="{{StaticUrlPrefix}}/vendor/assets/swagger-ui/swagger-ui-bundle.js"> </script>
+<script src="{{StaticUrlPrefix}}/vendor/assets/swagger-ui/swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function() {