Skip to content

Commit

Permalink
fix: preview test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyaomaru committed Sep 7, 2024
1 parent 5efb845 commit 1ea0b0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Home({ data }: PageProps<string>) {
const baseUrl = Deno.env.get("DENO_ENV") === "development"
? "http://localhost:8000"
: Deno.env.get("DENO_ENV") === "preview"
? "https://nyaomaru-deno-sample*"
? "https://nyaomaru-deno-sample--*.deno.dev"
: "https://nyaomaru-deno-sample.deno.dev";

if (!csp.directives.styleSrc) {
Expand All @@ -35,6 +35,8 @@ export default function Home({ data }: PageProps<string>) {
csp.directives.styleSrc.push(`${baseUrl}/styles.css`);
csp.directives.imgSrc.push(`${baseUrl}/logo.svg`);
csp.directives.scriptSrc.push(baseUrl);

console.log("DENO_DEPLOY_ID", Deno.env.get("DENO_DEPLOYMENT_ID"));
});

return (
Expand Down

0 comments on commit 1ea0b0e

Please sign in to comment.