fix: allow localhost as CORS origin

This commit is contained in:
Alexis Tyler
2021-08-18 13:24:12 +09:30
committed by GitHub
parent c37d8617d2
commit 14935b2bc3

View File

@@ -90,6 +90,9 @@ const getAllowedOrigins = (): string[] => {
// Only append the port if it's not HTTP/80 or HTTPS/443
return [...new Set([
// Localhost - Used for GUI mode
`http://localhost${webuiHTTPPort ? `:${webuiHTTPPort}` : ''}`,
// IP
`http://${localIp}${webuiHTTPPort ? `:${webuiHTTPPort}` : ''}`,
`https://${localIp}${webuiHTTPSPort ? `:${webuiHTTPSPort}` : ''}`,