Unrated-Limited-Unlimited / ua-frontend

Unrated Application
GNU General Public License v3.0
4 stars 0 forks source link

Refreshing Page or manually typing a url leads to a 500 Error #39

Closed Neelzee closed 4 months ago

Neelzee commented 4 months ago

Expected result

When I type unrated.no/whiskey/122 I should be redirected to that specific whisky

Actual result

I get an 500 error, this means we cannot link to sub-urls in our websites.

Probable causes

Could be a config mistake in Apache or Frontend.

Neelzee commented 4 months ago

Refreshing the webpage on unrated.no/whiskey/, the browser does a GET-request to https://unrated.no/whiskey, this is the response header:

HTTP/1.1 500 Internal Server Error
Date: Tue, 09 Apr 2024 07:11:13 GMT
Server: Apache/2.4.56 (Debian)
content-length: 1459
content-type: text/html
etag: "1iuwvsg"
link: <./_app/immutable/assets/0.BV1g7ARX.css>; rel="preload";as="style"; nopush, <./_app/immutable/entry/start.C-MWgQlG.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/entry.17LN-EHy.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/scheduler.8hQuFgQv.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/index.Bj7vs6IE.js>; rel="modulepreload"; nopush, <./_app/immutable/entry/app.DF--JAGc.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/env.BiH5oo81.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/index.Dl9Oc3oE.js>; rel="modulepreload"; nopush, <./_app/immutable/nodes/0.B5GgkfFS.js>; rel="modulepreload"; nopush, <./_app/immutable/chunks/featureFlagStore.Chmddy2-.js>; rel="modulepreload"; nopush, <./_app/immutable/nodes/1.X-OTgIvo.js>; rel="modulepreload"; nopush
x-sveltekit-page: true
Connection: close

I will look into Apacheand see if we need some configuration, @MikalDr and @591337 can you guys check Svelte-docs?

591337 commented 4 months ago

I think I might have found a solution. It might also make it slightly easier to deal with environment variables and node. It requires some frontend changes. Working on it.

591337 commented 4 months ago

@Neelzee #41 has a possible solution. Some info is in the readme. Basically, ORIGIN is a new environment variable and there is a way to run Node with the variables in a .env.