Skip to content

When launching the application, if the server Host and browser Host are different, the server API requests may fail. #20739

Description

@szmxx

Environment

  • Operating System: Darwin
  • Node Version: v16.13.1
  • Nuxt Version: 3.1.1
  • Nitro Version: 2.4.0
  • Package Manager: npm@8.1.2
  • Builder: vite
  • User Config: ssr, typescript, css, plugins, build, modules, experimental, components, vite, app, intlify, vueuse, windicss, content
  • Runtime Modules: unplugin-icons/nuxt, @intlify/nuxt3@0.2.4, @pinia/nuxt@0.4.10, @nuxt/content@2.6.0, @vueuse/nuxt@9.13.0, nuxt-windicss@2.6.1
  • Build Modules: -

Reproduction

any

Describe the bug

1、Set the startup port of Nuxt to 3000.
image
2、Integrate with the qiankun main application, with the main application port set to 9529.
image
3、At this point, the API host to be set to the browser's host.

Additional context

1、nuxt-app config
image

2、qiankun main-app config
image

3、nginx config
image

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions