pull/3839/merge
Lukas Miklosko 1 month ago committed by GitHub
commit 51e26a1dc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -203,7 +203,7 @@ CoreApp.getInitialProps = async (initialProps) => {
if (ctx.res) { if (ctx.res) {
// Check if app is initialized and redirect if necessary // Check if app is initialized and redirect if necessary
const response = await axios.get<PublicSettingsResponse>( const response = await axios.get<PublicSettingsResponse>(
`http://localhost:${process.env.PORT || 5055}/api/v1/settings/public` `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5055}/api/v1/settings/public`
); );
currentSettings = response.data; currentSettings = response.data;
@ -221,7 +221,7 @@ CoreApp.getInitialProps = async (initialProps) => {
try { try {
// Attempt to get the user by running a request to the local api // Attempt to get the user by running a request to the local api
const response = await axios.get<User>( const response = await axios.get<User>(
`http://localhost:${process.env.PORT || 5055}/api/v1/auth/me`, `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5055}/api/v1/auth/me`,
{ {
headers: headers:
ctx.req && ctx.req.headers.cookie ctx.req && ctx.req.headers.cookie

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<
CollectionPageProps CollectionPageProps
> = async (ctx) => { > = async (ctx) => {
const response = await axios.get<Collection>( const response = await axios.get<Collection>(
`http://localhost:${process.env.PORT || 5055}/api/v1/collection/${ `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5055}/api/v1/collection/${
ctx.query.collectionId ctx.query.collectionId
}`, }`,
{ {

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<MoviePageProps> = async (
ctx ctx
) => { ) => {
const response = await axios.get<MovieDetailsType>( const response = await axios.get<MovieDetailsType>(
`http://localhost:${process.env.PORT || 5055}/api/v1/movie/${ `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5055}/api/v1/movie/${
ctx.query.movieId ctx.query.movieId
}`, }`,
{ {

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<TvPageProps> = async (
ctx ctx
) => { ) => {
const response = await axios.get<TvDetailsType>( const response = await axios.get<TvDetailsType>(
`http://localhost:${process.env.PORT || 5055}/api/v1/tv/${ctx.query.tvId}`, `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5055}/api/v1/tv/${ctx.query.tvId}`,
{ {
headers: ctx.req?.headers?.cookie headers: ctx.req?.headers?.cookie
? { cookie: ctx.req.headers.cookie } ? { cookie: ctx.req.headers.cookie }

Loading…
Cancel
Save