fix everything
This commit is contained in:
parent
7541a89541
commit
f72d051caa
|
|
@ -48,8 +48,12 @@ app.get("/js/:path{.+}", async c => {
|
||||||
|
|
||||||
app.use("*", async (c, next) => {
|
app.use("*", async (c, next) => {
|
||||||
const url = new URL(c.req.url)
|
const url = new URL(c.req.url)
|
||||||
|
const localhost = url.hostname.endsWith("localhost")
|
||||||
const domains = url.hostname.split(".")
|
const domains = url.hostname.split(".")
|
||||||
const subdomain = domains.length > 1 ? domains[0]! : ""
|
let subdomain = ""
|
||||||
|
|
||||||
|
if (domains.length > (localhost ? 1 : 2))
|
||||||
|
subdomain = domains[0]!
|
||||||
|
|
||||||
if (subdomain) {
|
if (subdomain) {
|
||||||
const app = serveApp(c, subdomain)
|
const app = serveApp(c, subdomain)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user