mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: filter out wildcard origins from allowed domains
This commit is contained in:
@@ -337,6 +337,7 @@ export default abstract class BaseWebChannelHandler<
|
||||
// Get the allowed origins
|
||||
const origins: string[] = settings.allowed_domains.split(',');
|
||||
const foundOrigin = origins
|
||||
.filter((origin) => origin.trim() !== '*') // Skip "*"
|
||||
.map((origin) => {
|
||||
try {
|
||||
return new URL(origin.trim()).origin;
|
||||
|
||||
Reference in New Issue
Block a user