diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 47b0e08..7e7636c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,10 +2,6 @@ FROM node:23-alpine AS build WORKDIR /pastebook-frontend -ARG VITE_API_URL - -ENV VITE_API_URL=${VITE_API_URL} - COPY package*.json ./ RUN npm install COPY . . diff --git a/frontend/src/components/new/Submit.svelte b/frontend/src/components/new/Submit.svelte index de0080b..f4dc7bc 100755 --- a/frontend/src/components/new/Submit.svelte +++ b/frontend/src/components/new/Submit.svelte @@ -3,8 +3,6 @@ import { writableContent } from "$lib/stores.ts"; import { onMount } from "svelte"; - const backendUrl = import.meta.env.VITE_API_URL; - onMount(() => { writableTitle.subscribe(() => { allFieldsFilled(); @@ -50,9 +48,11 @@ console.log(backendUrl) alreadyUploading = true; - submit.classList.add("loading"); const xhr = new XMLHttpRequest(); - xhr.open("POST", `${backendUrl}/upload`); + + let domain = window.location.host; + + xhr.open("POST", `https://api.${domain}/upload`); xhr.setRequestHeader("Content-Type", "plain/text"); xhr.setRequestHeader("access-control-allow-methods", "POST"); xhr.setRequestHeader("title", $writableTitle); diff --git a/frontend/src/components/panel/ListedPaste.svelte b/frontend/src/components/panel/ListedPaste.svelte deleted file mode 100755 index a4fa3c9..0000000 --- a/frontend/src/components/panel/ListedPaste.svelte +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -