Skip to content

Blocked cross-origin request #54

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

Open
chrisfeng0723 opened this issue May 11, 2025 · 3 comments
Open

Blocked cross-origin request #54

chrisfeng0723 opened this issue May 11, 2025 · 3 comments

Comments

@chrisfeng0723
Copy link

GET /chat 200 in 7371ms
⚠ Blocked cross-origin request from 192.168.31.9to /_next/* resource. To allow this, configure "allowedDevOrigins" in next.config

@beat4ocean
Copy link

beat4ocean commented May 11, 2025

Cross origin request detected from 192.168.1.100 to /_next/* resource. In a future major version of Next.js, you will need to explicitly configure "allowedDevOrigins" in next.config to allow this.

@chrisfeng0723
Copy link
Author

My code is as follows, but it still doesn't work.
const config = {
// For development mode
turbopack: {
rules: {
".md": {
loaders: ["raw-loader"],
as: "
.js",
},
},
},

// For production mode
webpack: (config) => {
config.module.rules.push({
test: /.md$/,
use: "raw-loader",
});
return config;
},
allowedDevOrigins: ['localhost:8000', '127.0.0.1:8000','localhost:3000', '127.0.0.1:3000'],
};

Cross origin request detected from 192.168.1.100 to /_next/* resource. In a future major version of Next.js, you will need to explicitly configure "allowedDevOrigins" in next.config to allow this.

@ER-EPR
Copy link

ER-EPR commented May 12, 2025

My code is as follows, but it still doesn't work. const config = { // For development mode turbopack: { rules: { ".md": { loaders: ["raw-loader"], as: ".js", }, }, },

// For production mode webpack: (config) => { config.module.rules.push({ test: /.md$/, use: "raw-loader", }); return config; }, allowedDevOrigins: ['localhost:8000', '127.0.0.1:8000','localhost:3000', '127.0.0.1:3000'], };

Cross origin request detected from 192.168.1.100 to /_next/* resource. In a future major version of Next.js, you will need to explicitly configure "allowedDevOrigins" in next.config to allow this.

add to this place, no warnning now:

const config = {
  // For development mode
  turbopack: {
    rules: {
      "*.md": {
        loaders: ["raw-loader"],
        as: "*.js",
      },
    },
  },
  allowedDevOrigins: ['savorcare.com', '*.savorcare.com'],
  // For production mode

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

3 participants