import { Controller } from "@tsed/di"; import { HeaderParams } from "@tsed/platform-params"; import { View } from "@tsed/platform-views"; import { Hidden, Get, Returns } from "@tsed/schema"; @Hidden() @Controller("/app") export class AppController { @Get("/") @View("app/send.ejs") @(Returns(200, String).ContentType("text/html")) get(@HeaderParams("x-forwarded-proto") protocol: string, @HeaderParams("host") host: string) { const hostUrl = `${protocol || "http"}://${host}`; return { BASE_URL: hostUrl }; } }