fix: prefixUrl

master
pooya parsa 2019-03-18 22:31:55 +03:30
parent 18e5fa1f7a
commit 09a5382778
1 changed files with 3 additions and 3 deletions

View File

@ -45,13 +45,13 @@ const extendKYInstance = instance => {
}
export default (ctx, inject) => {
// Set baseURL
const baseURL = process.browser
// Set prefixUrl
const prefixUrl = process.browser
? '<%= options.browserBaseURL %>'
: (process.env._HTTP_BASE_URL_ || '<%= options.baseURL %>')
const kyDefaults = {
baseURL,
prefixUrl,
headers: {}
}