Skip to content

Commit

Permalink
Merge pull request #275 from nuxt-community/browserHttpEndpoint
Browse files Browse the repository at this point in the history
add browserHttpEndpoint option for client requests close #272
  • Loading branch information
kieusonlam authored Oct 29, 2019
2 parents c6976e5 + d7b02af commit 28554ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/templates/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export default (ctx, inject) => {
if (!<%= key %>ClientConfig.getAuth) {
<%= key %>ClientConfig.getAuth = <%= key %>GetAuth
}

if (process.client && <%= key %>ClientConfig.browserHttpEndpoint) {
<%= key %>ClientConfig.httpEndpoint = <%= key %>ClientConfig.browserHttpEndpoint
}

<%= key %>ClientConfig.ssr = !!process.server
<%= key %>ClientConfig.cache = <%= key %>Cache
<%= key %>ClientConfig.tokenName = <%= key %>TokenName
Expand Down

0 comments on commit 28554ab

Please sign in to comment.