We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to enable CORS on the FastAPI server so that only the NextJS frontend can make requests to it?
I've tried the standard way below, which didn't work. Could the fix involve modifying the Next rewrite configs?
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware app = FastAPI() app.add_middleware( CORSMiddleware, allow_origins=['http://localhost:3000', 'https://helloworld.vercel.app'], allow_methods=["*"], allow_headers=["*"], ) ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is it possible to enable CORS on the FastAPI server so that only the NextJS frontend can make requests to it?
I've tried the standard way below, which didn't work. Could the fix involve modifying the Next rewrite configs?
The text was updated successfully, but these errors were encountered: