diff --git a/docs/content/2.setup.md b/docs/content/2.setup.md index be5d9b89..8173cabc 100644 --- a/docs/content/2.setup.md +++ b/docs/content/2.setup.md @@ -33,7 +33,7 @@ Defaults: ```ts { - url: process.env.STRAPI_URL || 'http://localhost:1337', + url: process.env.STRAPI_URL || 'http://127.0.0.1:1337', prefix: '/api', version: 'v4', cookie: {}, @@ -47,7 +47,7 @@ If you want to override any options on runtime, you may use [Nuxt 3 runtime-conf runtimeConfig: { public: { strapi: { - url: 'http://localhost:1337' // can be overridden by NUXT_PUBLIC_STRAPI_URL environment variable + url: 'http://127.0.0.1:1337' // can be overridden by NUXT_PUBLIC_STRAPI_URL environment variable } } }, diff --git a/example/nuxt.config.ts b/example/nuxt.config.ts index 0019a4be..af33b945 100644 --- a/example/nuxt.config.ts +++ b/example/nuxt.config.ts @@ -6,14 +6,14 @@ export default defineNuxtConfig({ ], // example of separate client/server URLs // runtimeConfig: { - // strapi: { url: 'http://localhost:1337' }, + // strapi: { url: 'http://127.0.0.1:1337' }, // public: { - // strapi: { url: 'http://localhost:1337' } + // strapi: { url: 'http://127.0.0.1:1337' } // } // }, strapi: { version: 'v3', - url: 'http://localhost:1337' + url: 'http://127.0.0.1:1337' // To enable the devtools, read https://strapi.nuxtjs.org/devtools // devtools: true }, diff --git a/src/module.ts b/src/module.ts index 94c7de24..25bf3b9e 100644 --- a/src/module.ts +++ b/src/module.ts @@ -12,7 +12,7 @@ export interface ModuleOptions { /** * Strapi API URL * @default process.env.STRAPI_URL - * @example 'http://localhost:1337' + * @example 'http://127.0.0.1:1337' * @type string */ url?: string @@ -74,7 +74,7 @@ export default defineNuxtModule({ } }, defaults: { - url: process.env.STRAPI_URL || 'http://localhost:1337', + url: process.env.STRAPI_URL || 'http://127.0.0.1:1337', prefix: '/api', version: 'v4', cookie: {},