From 4ac61bcd9079a799168c01535ae3fcef2d23e8da Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Fri, 12 Jul 2024 09:20:55 -0400 Subject: [PATCH] docker fix --- docker-compose.yml | 4 ++-- frontend/src/routes/adventures/+page.server.ts | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a497206..90e3194 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: #image: ghcr.io/seanmorley15/adventurelog-frontend:latest environment: - PUBLIC_SERVER_URL=http://server:8000 - - ORIGIN=http://10.0.0.92:8080 + - ORIGIN=http://localhost:8080 - BODY_SIZE_LIMIT=Infinity ports: - "8080:3000" @@ -34,7 +34,7 @@ services: - DJANGO_ADMIN_USERNAME=admin - DJANGO_ADMIN_PASSWORD=admin - DJANGO_ADMIN_EMAIL=admin@example.com - - PUBLIC_URL='http://10.0.92:81' + - PUBLIC_URL='http://localhost:81' - CSRF_TRUSTED_ORIGINS=https://api.adventurelog.app,https://adventurelog.app - DEBUG=False ports: diff --git a/frontend/src/routes/adventures/+page.server.ts b/frontend/src/routes/adventures/+page.server.ts index 48af4d2..2f7d1e2 100644 --- a/frontend/src/routes/adventures/+page.server.ts +++ b/frontend/src/routes/adventures/+page.server.ts @@ -442,12 +442,6 @@ export const actions: Actions = { // Start with the current URL if next and previous are not provided let url: string = next || previous || event.url.toString(); - let index = url.indexOf('/api'); - let newUrl = url.substring(index); - console.log('NEW URL' + newUrl); - url = serverEndpoint + newUrl; - console.log('URL' + url); - // Replace or add the page number in the URL if (url.includes('page=')) { url = url.replace(/page=\d+/, `page=${page}`);