Fix fetch inside docker container
This commit is contained in:
parent
eb796bfa51
commit
57e87d314b
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue