@@ -56,7 +56,7 @@ export default {
5656 ' h' : h
5757 }
5858 try {
59- const response = await this .$http .get (' api/state' , {params: params})
59+ const response = await this .$http .get (process . env . PREFIX_PATH + ' / api/state' , {params: params})
6060 const body = response .data
6161 if (body .code !== 200 ) {
6262 this .stateErrorCount += 1
@@ -71,7 +71,7 @@ export default {
7171
7272 // adaptive resolution
7373 if (! body .data .config .fixedResolution && body .data .config .sizeChangedCount === 0 ) {
74- const response = await this .$http .get (' api/reset' , {params: params})
74+ const response = await this .$http .get (process . env . PREFIX_PATH + ' / api/reset' , {params: params})
7575 const body = response .data
7676 if (body .code !== 200 ) {
7777 this .stateErrorCount += 1
@@ -136,6 +136,7 @@ export default {
136136 // console.trace()
137137 console .log (` connecting...` )
138138 this .errorMessage = ' '
139+ let websockifyPath = process .env .PREFIX_PATH + ' /websockify'
139140 if (force || this .vncState === ' stopped' ) {
140141 this .vncState = ' connecting'
141142 let hostname = window .location .hostname
@@ -146,7 +147,7 @@ export default {
146147 let url = ' static/vnc.html?'
147148 url += ' autoconnect=1&'
148149 url += ` host=${ hostname} &port=${ port} &`
149- url += ` path=websockify &title=novnc2&`
150+ url += ` path=${ websockifyPath } &title=novnc2&`
150151 url += ` logging=warn`
151152 this .$refs .vncFrame .setAttribute (' src' , url)
152153 }
0 commit comments