Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Proxy does not work for some pages #641

Closed
TheAlexLichter opened this issue Nov 7, 2022 · 1 comment
Closed

Dev Proxy does not work for some pages #641

TheAlexLichter opened this issue Nov 7, 2022 · 1 comment

Comments

@TheAlexLichter
Copy link
Member

TheAlexLichter commented Nov 7, 2022

Environment


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nitro Version: 0.6.1
  • Package Manager: [email protected]

Reproduction

  1. Open the StackBlitz
  2. Go to /proxy
  3. See that proxy to http://example.com does not work
  4. Go to /proxy-2
  5. See that the proxy to https://api.albionstatus.com works

Config:

import { defineNitroConfig } from 'nitropack';

export default defineNitroConfig({
  devProxy: {
    '/proxy': { target: 'http://example.com', changeOrigin: true },
    '/proxy-2': { target: 'https://api.albionstatus.com', changeOrigin: true },
  },
});

Describe the bug

The devProxy option does not work for some pages 🤔

Additional context

Also: Would be nice to add some tests for the proxy routes. Fixture is there but no test yet.

Related: nuxt/nuxt#15388

Logs

No response

@TheAlexLichter
Copy link
Member Author

Tested locally. Seems that some proxy-settings don't work in StackBlitz due to CORS. If you rebuild the linked StackBlitz locally, it will work fine ☺️

@TheAlexLichter TheAlexLichter closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant