I get "Blocked request" when deploying astro website on kubernetes #408
-
I get this error when trying to reach the astro app deployed on big-mama.io
I tried doing as it says and adding the host to allowes hosts in vite.config.js but the error stayed
but the same problem here the docker file I am using # Use the official lightweight Node.js image with a version that supports pnpm. FROM node:18-slim # Set the working directory inside the container WORKDIR /app # Install pnpm RUN npm install -g pnpm serve # Copy the package.json and pnpm-lock.yaml files first to leverage Docker cache COPY package.json pnpm-lock.yaml ./ # Install dependencies using pnpm RUN pnpm install --frozen-lockfile # Copy the rest of your app's source code COPY . . # Build the Astro application RUN pnpm run build EXPOSE 4321 # Serve the build directory on container startup CMD ["pnpm", "run", "preview", "--host"] my
please help me slove this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You should read https://vite.dev/guide/static-deploy.html#deploying-a-static-site or https://docs.astro.build/en/guides/deploy/ If you site is purely static, I advice using Netlify which doesn't require anything a part from linking the github repo. |
Beta Was this translation helpful? Give feedback.
-
Yes |
Beta Was this translation helpful? Give feedback.
You should read https://vite.dev/guide/static-deploy.html#deploying-a-static-site or https://docs.astro.build/en/guides/deploy/
If you site is purely static, I advice using Netlify which doesn't require anything a part from linking the github repo.