Skip to content

Commit c21ab64

Browse files
authored
fix: allow CORS from loopback addresses by default (#598) (#996)
Co-authored-by: Rush Ali <[email protected]> closes #598 #996
1 parent 10adc5a commit c21ab64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/config/server-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export default defineConfig({
160160
## server.cors
161161

162162
- **Typ:** `boolean | CorsOptions`
163-
- **Standardwert:** `false`
163+
- **Standardwert:** `{ origin: /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/ }` (erlaubt localhost, `127.0.0.1` und `::1`)
164164

165165
Konfigurieren Sie CORS für den Entwicklungsserver. Übergeben Sie ein [Optionsobjekt](https://github.com/expressjs/cors#configuration-options), um das Verhalten fein abzustimmen, oder `false`, um es zu deaktivieren.
166166

0 commit comments

Comments
 (0)