mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-03 20:43:22 +00:00
Update WebServerService.js
This commit is contained in:
1 parent
053728a03f
commit
fd4e2f59dc
1 file changed
+1
-1
@@ -299,7 +299,7 @@ class WebServerService extends BaseService {
|
||||
const hostName = hostHeader.split(':')[0].trim().toLowerCase();
|
||||
|
||||
// Check if the hostname matches any of the allowed domains
|
||||
if (allowedDomains.some(allowedDomain => hostName === allowedDomain)) {
|
||||
if (allowedDomains.some(allowedDomain => hostName.endsWith(allowedDomain))) {
|
||||
next(); // Proceed if the host is valid
|
||||
} else {
|
||||
return res.status(400).send('Invalid Host header.');
|
||||
|
||||
Reference in new issue
Block a user