Skip to content

Commit

Permalink
fix!: always use appHost if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Milfred committed Jun 12, 2024
1 parent 43f6a52 commit c78cc43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"source.fixAll.eslint": "explicit"
},
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
6 changes: 1 addition & 5 deletions src/runtime/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ export default defineNuxtPlugin((nuxtApp) => {
appHost = hostname;
}

const isLocalHost =
appHost.includes('localhost') ||
/\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}/.test(appHost);

appHost = isLocalHost ? environment.public.appHost : appHost;
appHost = environment.public.appHost || appHost;

/**
* host handling end
Expand Down

0 comments on commit c78cc43

Please sign in to comment.