Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): alllow OPTIONS requests to be p…
Browse files Browse the repository at this point in the history
…roxied 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)
  • Loading branch information
alan-agius4 committed Jan 16, 2024
1 parent e76950e commit 329d800
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ export async function setupServer(
open: serverOptions.open,
headers: serverOptions.headers,
proxy,
cors: {
// Allow preflight requests to be proxied.
preflightContinue: true,
},
// File watching is handled by the build directly. `null` disables file watching for Vite.
watch: null,
fs: {
Expand Down

0 comments on commit 329d800

Please sign in to comment.