Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Sep 2, 2024
1 parent b86d9e7 commit 0367e4b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions serverless/aws/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ export const handlerRaw = async (
const header = await p.getHeader();

if (!tile) {
if (!(process.env.PUBLIC_HOSTNAME || event.headers['x-distribution-domain-name'])) {
if (
!(
process.env.PUBLIC_HOSTNAME ||
event.headers["x-distribution-domain-name"]
)
) {
return apiResp(
501,
"PUBLIC_HOSTNAME must be set for TileJSON",
Expand All @@ -173,7 +178,9 @@ export const handlerRaw = async (
const t = tileJSON(
header,
await p.getMetadata(),
process.env.PUBLIC_HOSTNAME || event.headers['x-distribution-domain-name'] || "",
process.env.PUBLIC_HOSTNAME ||
event.headers["x-distribution-domain-name"] ||
"",
name
);

Expand Down

0 comments on commit 0367e4b

Please sign in to comment.