mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
配置注释补上本地测试页面的跨域说明
本地文件直接打开的测试页面,浏览器上报的来源是 null,不在名单里就拿 不到响应。跨域调试这类页面时要把 null 一并填进名单,否则读不到结果, 容易误以为接口坏了。
This commit is contained in:
parent
7e70484540
commit
22857abee9
1 changed files with 2 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ server:
|
|||
# 需要跨域时填具体来源,例如 ["https://your-console.example.com"]
|
||||
# 注意:填 "*" 不会放行任意来源。来源不在名单里就不下发跨域头,
|
||||
# 浏览器会直接拦下,带凭证的请求仍受同源保护
|
||||
# 另:用本地文件直接打开的测试页面(如 digital-human/index.html)
|
||||
# 浏览器上报的来源是 null,需要跨域时把 "null" 一并填进来
|
||||
cors:
|
||||
allowed_origins: []
|
||||
# MQTT网关配置,用于通过OTA下发到设备,根据mqtt_gateway的.env文件配置,格式为host:port
|
||||
|
|
|
|||
Loading…
Reference in a new issue