fix sttauspage

This commit is contained in:
Simon Larsen 2022-12-30 09:47:38 +00:00
parent 8061d390c2
commit 5d831343d8
3 changed files with 5 additions and 4 deletions

View File

@ -67,7 +67,7 @@ export default class StatusPageAPI extends BaseAPI<
`${new this.entityType().getCrudApiPath()?.toString()}/status-page-api/cname-verification/:token`,
async (req: ExpressRequest, res: ExpressResponse) => {
const host: string | undefined = req.get('host');
console.log("HERE!")
if (!host) {
throw new BadDataException('Host not found');
}
@ -102,6 +102,7 @@ export default class StatusPageAPI extends BaseAPI<
this.router.get(
`${new this.entityType().getCrudApiPath()?.toString()}/.well-known/acme-challenge/:token`,
async (req: ExpressRequest, res: ExpressResponse) => {
console.log("HERE!")
const challenge: GreenlockChallenge | null =
await GreenlockChallengeService.findOneBy({
query: {

View File

@ -6,7 +6,7 @@ import URL from 'Common/Types/API/URL';
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
export const env: Function = (key: string): string => {
return process.env[key] || window.process.env[key] || '';
return window?.process?.env[key] || process?.env[key] || '';
};
export const HTTP_PROTOCOL: Protocol =

View File

@ -90,7 +90,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://dashboard-api/status-page/status-page-api;
proxy_pass http://dashboard-api/api/status-page/status-page-api;
}
# Acme Verification.
@ -105,7 +105,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://dashboard-api/status-page/.well-known;
proxy_pass http://dashboard-api/api/status-page/.well-known;
}
}