Define base URL
Change-Id: I41778eb2a81ef86225a5218e81d1746eb926eedd
diff --git a/cmd/koralmapper/main_test.go b/cmd/koralmapper/main_test.go
index c53cd54..6121fe3 100644
--- a/cmd/koralmapper/main_test.go
+++ b/cmd/koralmapper/main_test.go
@@ -1936,8 +1936,8 @@
assert.Contains(t, htmlContent, `data-service-url="https://example.com/plugin/koralmapper"`)
// Static file references
- assert.Contains(t, htmlContent, `/static/style.css`)
- assert.Contains(t, htmlContent, `/static/config.js`)
+ assert.Contains(t, htmlContent, `static/style.css`)
+ assert.Contains(t, htmlContent, `static/config.js`)
// Request/response sections
assert.Contains(t, htmlContent, "<legend>Request</legend>")
diff --git a/cmd/koralmapper/static/config.html b/cmd/koralmapper/static/config.html
index dd286e4..8eff82e 100644
--- a/cmd/koralmapper/static/config.html
+++ b/cmd/koralmapper/static/config.html
@@ -3,8 +3,9 @@
<head>
<meta charset="UTF-8">
<title>{{.Title}}</title>
+ <base href="{{.ServiceURL}}" target="_blank">
<link rel="stylesheet" href="{{.Stylesheet}}">
- <link rel="stylesheet" href="/static/style.css">
+ <link rel="stylesheet" href="static/style.css">
<script src="{{.SDK}}"
data-server="{{.Server}}"></script>
</head>
@@ -83,6 +84,6 @@
<p><tt>{{.Version}} - {{.Date}} {{.Hash}}</tt></p>
</footer>
</div>
- <script src="/static/config.js"></script>
+ <script src="static/config.js"></script>
</body>
</html>
diff --git a/cmd/koralmapper/static/plugin.html b/cmd/koralmapper/static/plugin.html
index 2000c06..b4cc149 100644
--- a/cmd/koralmapper/static/plugin.html
+++ b/cmd/koralmapper/static/plugin.html
@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>{{.Title}}</title>
+ <base href="{{.ServiceURL}}" target="_blank">
<script src="{{.SDK}}"
data-server="{{.Server}}"></script>
</head>