R
Railwayβ€’12mo ago
Adam

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:
https://github.com/brody192/create-react-app-starter copy the Caddyfile and nixpacks.toml from this repo into yours...
Jump to solution
20 Replies
Percy
Percyβ€’12mo ago
Project ID: N/A
Adam
AdamOPβ€’12mo ago
@Brody :)
Fragly
Fraglyβ€’12mo ago
No way
Brody
Brodyβ€’12mo ago
πŸ™‚
Adam
AdamOPβ€’12mo ago
I don't know react and am doing a project
Brody
Brodyβ€’12mo ago
react-scripts start starts a development server, lots of issues with that besides being a resource hog
Adam
AdamOPβ€’12mo ago
okay 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
Brody
Brodyβ€’12mo ago
https://github.com/brody192/create-react-app-starter copy the Caddyfile and nixpacks.toml from this repo into yours
Brody
Brodyβ€’12mo ago
(triple back ticks)
Adam
AdamOPβ€’12mo ago
ty
ty
Didn't work
Adam
AdamOPβ€’12mo ago
No description
Brody
Brodyβ€’12mo ago
new build logs please
Brody
Brodyβ€’12mo ago
looks good, theres no http requests there, so you are likely hitting the cache
Adam
AdamOPβ€’12mo ago
wait sorry I was looking at production preproduction looks like it's working! ty brody lifesaver
Brody
Brodyβ€’12mo ago
no problem!
Fragly
Fraglyβ€’12mo ago
Brody saves the day, again
Adam
AdamOPβ€’12mo ago
I will never learn js
Brody
Brodyβ€’12mo ago
based
Want results from more Discord servers?
Add your server