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)) {
|
if(user !== null && await verify(user.password, password as string)) {
|
||||||
const sessionTime = config.SESSION_TIME_MINUTES * 60;
|
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',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username,
|
username,
|
||||||
|
|
|
@ -60,7 +60,7 @@ if(Astro.request.method === "POST") {
|
||||||
|
|
||||||
const sessionTime = config.SESSION_TIME_MINUTES * 60;
|
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',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username,
|
username,
|
||||||
|
|
Loading…
Reference in New Issue