fix(cors): origin on all subdomains
All checks were successful
ci / docker (push) Successful in 4m21s
All checks were successful
ci / docker (push) Successful in 4m21s
This commit is contained in:
parent
9082287ad3
commit
e97a911fbe
1 changed files with 6 additions and 1 deletions
|
@ -21,7 +21,12 @@ app.use(
|
|||
);
|
||||
|
||||
// Allow CORS for tjo.space
|
||||
app.use(cors({ origin: "https://tjo.space" }));
|
||||
app.use(
|
||||
cors({
|
||||
origin: (origin: string) =>
|
||||
origin.endsWith(".tjo.space") ? origin : "https://tjo.space",
|
||||
}),
|
||||
);
|
||||
// But, /.well-known requests from anywhere.
|
||||
app.use("/.well-known/*", cors({ origin: "*" }));
|
||||
|
||||
|
|
Loading…
Reference in a new issue