mirror of
https://github.com/coaidev/coai.git
synced 2025-05-22 06:20:14 +09:00
fix
This commit is contained in:
parent
65ab0d8b33
commit
c6bc968b57
@ -10,10 +10,10 @@ const ChatMaxThread = 5
|
|||||||
const AnonymousMaxThread = 1
|
const AnonymousMaxThread = 1
|
||||||
|
|
||||||
var AllowedOrigins = []string{
|
var AllowedOrigins = []string{
|
||||||
"fystart.cn",
|
|
||||||
"fystart.com",
|
|
||||||
"chatnio.net",
|
"chatnio.net",
|
||||||
"nextweb.chatnio.net",
|
"nextweb.chatnio.net",
|
||||||
|
"fystart.cn",
|
||||||
|
"fystart.com",
|
||||||
}
|
}
|
||||||
|
|
||||||
func OriginIsAllowed(uri string) bool {
|
func OriginIsAllowed(uri string) bool {
|
||||||
@ -22,7 +22,7 @@ func OriginIsAllowed(uri string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if instance.Host == "localhost" || instance.Scheme == "file" {
|
if instance.Hostname() == "localhost" || instance.Scheme == "file" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user