diff --git a/Dockerfile b/Dockerfile index aa08244..3cac457 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:16-alpine as base RUN apk add --no-cache libc6-compat WORKDIR /app -COPY package-lock.json package.json ./ +COPY pnpm-lock.yaml package.json ./ RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7 &&\ pnpm i &&\ pnpm build diff --git a/next.config.js b/next.config.js index cb1522a..2245e1b 100644 --- a/next.config.js +++ b/next.config.js @@ -5,13 +5,13 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ // You might need to insert additional domains in script-src if you are using external services const ContentSecurityPolicy = ` default-src 'self'; - script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app comment.ivanli.cc; - style-src 'self' 'unsafe-inline' comment.ivanli.cc; + script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app comment.ivanli.cc localhost:8080; + style-src 'self' 'unsafe-inline' comment.ivanli.cc localhost:8080; img-src * blob: data:; media-src 'none'; connect-src *; - font-src 'self' comment.ivanli.cc; - frame-src giscus.app comment.ivanli.cc + font-src 'self' comment.ivanli.cc localhost:8080; + frame-src giscus.app ` const securityHeaders = [