Spaces:
Running
Running
File size: 466 Bytes
5301c48 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import { NextRequest } from 'next/server';
import { proxyToBackend, createCORSResponse } from '../../utils/proxy';
export async function POST(req: NextRequest) {
return proxyToBackend(req, '/dataset/get');
}
// Optional: Handle OPTIONS requests for CORS if you ever call this from a different origin
// or use custom headers that trigger preflight requests. For same-origin, it's less critical.
export async function OPTIONS() {
return createCORSResponse();
} |