You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite's `allowedHosts` option does not enable CORS; instead, it allows the dev server to respond to requests with a matching hostname (e.g., http://example.com/main.js). It only verifies that the request’s hostname is on the allowed list. However, this does not consider the `origin` in the case of a CORS request.
This commit updates Vite's configuration to enable CORS.
Closes#29549
(cherry picked from commit be15b88)
Copy file name to clipboardExpand all lines: packages/angular/build/src/builders/dev-server/schema.json
+2-2
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,12 @@
37
37
"description": "SSL certificate to use for serving HTTPS."
38
38
},
39
39
"allowedHosts": {
40
-
"description": "The hosts that can access the development server. This option sets the Vite option of the same name. For further details: https://vite.dev/config/server-options.html#server-allowedhosts",
40
+
"description": "The hosts that the development server will respond to. This option sets the Vite option of the same name. For further details: https://vite.dev/config/server-options.html#server-allowedhosts",
41
41
"default": [],
42
42
"oneOf": [
43
43
{
44
44
"type": "array",
45
-
"description": "List of hosts that are allowed to access the development server.",
45
+
"description": "A list of hosts that the development server will respond to.",
0 commit comments