新增一个配置 Access-Control-Allow-Origin 的配置项
LeoQuote opened this issue · 2 comments
LeoQuote commented
跨域请求必须要有这个header, 要对特定的域(refer) 做白名单, 对这些refer 来的请求, 在返回中加上 Access-Control-Allow-Origin header
LeoQuote commented
真是奇怪, 按照 starlette 的文档写了 CORSMiddleware , 但是header 还是没有加上, 非常奇怪🤔
LeoQuote commented
蛋疼, 原来是之前起的老服务一直没重启, Windows上重新在同一端口起服务居然不会报端口占用, 令人困惑