mirror of
https://github.com/unraid/api.git
synced 2026-01-13 20:19:56 -06:00
fix: allow localhost as CORS origin
This commit is contained in:
@@ -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}` : ''}`,
|
||||
|
||||
Reference in New Issue
Block a user