pull/3839/merge
Lukas Miklosko 2 weeks 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) {
// Check if app is initialized and redirect if necessary
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;
@ -221,7 +221,7 @@ CoreApp.getInitialProps = async (initialProps) => {
try {
// Attempt to get the user by running a request to the local api
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:
ctx.req && ctx.req.headers.cookie

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<
CollectionPageProps
> = async (ctx) => {
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
}`,
{

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<MoviePageProps> = async (
ctx
) => {
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
}`,
{

@ -15,7 +15,7 @@ export const getServerSideProps: GetServerSideProps<TvPageProps> = async (
ctx
) => {
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
? { cookie: ctx.req.headers.cookie }

Loading…
Cancel
Save