mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-06 20:28:48 +00:00
Fix this
This commit is contained in:
parent
0d0f465e16
commit
133a0a6539
1 changed files with 1 additions and 0 deletions
|
@ -4,6 +4,7 @@ export function middleware(req) {
|
|||
// Check the Host header, if HOMEPAGE_ALLOWED_HOSTS is set
|
||||
const host = req.headers.get("host");
|
||||
const port = process.env.PORT || 3000;
|
||||
let allowedHosts = [`localhost:${port}`, `127.0.0.1:${port}`];
|
||||
const allowAll = process.env.HOMEPAGE_ALLOWED_HOSTS === "*";
|
||||
if (process.env.HOMEPAGE_ALLOWED_HOSTS) {
|
||||
allowedHosts = allowedHosts.concat(process.env.HOMEPAGE_ALLOWED_HOSTS.split(","));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue