Invalid Host Header issue - React App
Hey all, having an issue with a react app hosted on Railway.
It all works locally, but when accessing the url on Railway I get the error above. Any ideas?
Logs are below
Solution:Jump to solution
https://github.com/brody192/create-react-app-starter
copy the Caddyfile and nixpacks.toml from this repo into yours...
20 Replies
Project ID:
N/A
@Brody :)
No way
π
I don't know react and am doing a project
react-scripts start
starts a development server, lots of issues with that besides being a resource hogokay gotcha what should I use instead
idc about resource hog this is temporary
βββββββββ Nixpacks v1.19.0 ββββββββ
β setup β nodejs_18, npm-8_x β
βββββββββββββββββββββββββββββββββββ
β install β npm ci β
βββββββββββββββββββββββββββββββββββ
β build β npm run build β
βββββββββββββββββββββββββββββββββββ
β start β npm run start β
βββββββββββββββββββββββββββββββββββ
Solution
https://github.com/brody192/create-react-app-starter
copy the Caddyfile and nixpacks.toml from this repo into yours
(triple back ticks)
Didn't work
new build logs please
looks good, theres no http requests there, so you are likely hitting the cache
wait sorry I was looking at production
preproduction looks like it's working! ty brody lifesaver
no problem!
Brody saves the day, again
I will never learn js
based