Skip to content

Commit 5c2f9a1

Browse files
authored
Make the UI perform XHRs relative to its own path
1 parent 7d5200a commit 5c2f9a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/vue.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ <h2 class="headline">The best way to start developing</h2>
147147
getInfo: function() {
148148
var xhr = new XMLHttpRequest()
149149
var self = this
150-
xhr.open('GET', "/api/info")
150+
xhr.open('GET', "api/info")
151151
xhr.onload = function () {
152152
data = JSON.parse(xhr.responseText)
153153
// reload page when the version changes
@@ -170,7 +170,7 @@ <h2 class="headline">The best way to start developing</h2>
170170
},
171171
postBackend: function() {
172172
var self = this
173-
fetch("/api/echo", {
173+
fetch("api/echo", {
174174
method: 'post',
175175
headers: {
176176
"Content-type": "application/json; charset=UTF-8",

0 commit comments

Comments
 (0)