Skip to content

Commit 09b5cca

Browse files
authored
fix: allow CORS from loopback addresses by default (#1813)
1 parent 97a4aa9 commit 09b5cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/server-options.md

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

163163
- **型:** `boolean | CorsOptions`
164-
- **デフォルト:** `false`
164+
- **デフォルト:** `{ origin: /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/ }`(localhost, `127.0.0.1`, `::1` を許可)
165165

166166
開発サーバーの CORS を設定します。[オプションオブジェクト](https://github.com/expressjs/cors#configuration-options)を渡して微調整するか、`true` で任意のオリジンを許可します。
167167

0 commit comments

Comments
 (0)