Skip to content

Commit 329d800

Browse files
committed
fix(@angular-devkit/build-angular): alllow OPTIONS requests to be proxied when using vite
This commit fixes an issue were `OPTIONS` requests were not being proxied when using Vite dev-server Closes #26782 (cherry picked from commit 771fdcd)
1 parent e76950e commit 329d800

File tree

1 file changed

+4
-0
lines changed
  • packages/angular_devkit/build_angular/src/builders/dev-server

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts

+4
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ export async function setupServer(
483483
open: serverOptions.open,
484484
headers: serverOptions.headers,
485485
proxy,
486+
cors: {
487+
// Allow preflight requests to be proxied.
488+
preflightContinue: true,
489+
},
486490
// File watching is handled by the build directly. `null` disables file watching for Vite.
487491
watch: null,
488492
fs: {

0 commit comments

Comments
 (0)