Fix fetch inside docker container

This commit is contained in:
Aelita4 2024-06-02 15:14:44 +02:00
parent eb796bfa51
commit 57e87d314b
Signed by: Aelita4
GPG Key ID: E44490C2025906C1
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ if(Astro.request.method === "POST") {
if(user !== null && await verify(user.password, password as string)) {
const sessionTime = config.SESSION_TIME_MINUTES * 60;
const res = await fetch(`${Astro.url.origin}/api/auth/generateAccessToken`, {
const res = await fetch(`http://localhost:4321/api/auth/generateAccessToken`, {
method: 'POST',
body: JSON.stringify({
username,

View File

@ -60,7 +60,7 @@ if(Astro.request.method === "POST") {
const sessionTime = config.SESSION_TIME_MINUTES * 60;
const res = await fetch(`${Astro.url.origin}/api/auth/generateAccessToken`, {
const res = await fetch(`http://localhost:4321/api/auth/generateAccessToken`, {
method: 'POST',
body: JSON.stringify({
username,