ChiefOnboarding icon indicating copy to clipboard operation
ChiefOnboarding copied to clipboard

Bad Request (400)

Open OxygenGS opened this issue 10 months ago • 45 comments

Hi, i installed the docker compose without Caddy, and i get a Bad Request (400). Now what?

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

Did you set the ALLOWED_HOSTS environment variable? Please check if the value is correct.

GDay avatar Feb 27 '25 21:02 GDay

How to set it so all connections are allowed? or Localhost for example

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

You can set it to localhost or you can use * as a wildcard. It's not recommended, but you could.

GDay avatar Feb 27 '25 21:02 GDay

Alrighty. Well, i use Cloudflare Tunnel for the domains. so i guess i should use the domain ill give it from there?

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

Yup

GDay avatar Feb 27 '25 21:02 GDay

Alright. We use Microsoft at work (Teams etc) and not slack. Will this work with that?

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

Only Slack is supported. You can still use the dashboard for new hires though, but you cannot use the bot. related to https://github.com/chiefonboarding/ChiefOnboarding/issues/262

GDay avatar Feb 27 '25 21:02 GDay

Alright. Well i entered my domain like this: https://onb.websiteadres.com but it does not work

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

Try to remove https://

GDay avatar Feb 27 '25 21:02 GDay

Nope, does not work sadly...

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

I even opend the port 7777 in the firewall, but it does not show...

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

Can you try with the wildcard option?

GDay avatar Feb 27 '25 21:02 GDay

Yes that works. But is it safe that way? haha

OxygenGS avatar Feb 27 '25 21:02 OxygenGS

I would suggest using the actual domain, but now we at least know that setting is indeed the issue.

If there is a port attached to the domain name, then try with including that too.

GDay avatar Feb 27 '25 21:02 GDay

Alright. Ill try that. It would be so awesome to have this in a LXC container in proxmox. I just now noticed your the create; well fcking done man! Super vet gedaan!

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

Ok so. If i install it with *, i can acces it on the pc, but not via the domain configurd via cludflare via the tunnel aiming at the ip+port

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

I just now noticed your the create; well fcking done man! Super vet gedaan!

Dankje :)

but not via the domain configurd via cludflare via the tunnel aiming at the ip+port

What error do you get there? With * it should be accessible from any domain.

GDay avatar Feb 27 '25 22:02 GDay

Deze site is niet bereikbaar. I first thought it was the tunnel, but the other stuff works.. hmm

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

That doesn't sound like an error related to chiefonboarding. something else is probably not right.

GDay avatar Feb 27 '25 22:02 GDay

Jeah trying to figure out what exactly. btw i did notice not all is translated to Dutch. Will that still come along?

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

Can you give some examples?

GDay avatar Feb 27 '25 22:02 GDay

Maybe i need to add HTTP_INSECURE=True? Not sure do, because cloudflare handles the SSL

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

That might do the trick, feel free to try. Does it hit the logs when you try to access it?

GDay avatar Feb 27 '25 22:02 GDay

Hmm did replace * with the ip, and then it load, but once i try to login: Verboden (403) CSRF-verificatie mislukt. Aanvraag afgebroken.

U ziet deze melding, omdat deze website vereist dat een CSRF-cookie wordt meegestuurd bij het verzenden van formulieren. Dit cookie is om veiligheidsredenen vereist om er zeker van te zijn dat uw browser niet door derden wordt gekaapt.

Als u cookies in uw webbrowser hebt uitgeschakeld, schakel deze dan weer in, op zijn minst voor deze website, of voor ‘same-origin’-aanvragen.

Meer informatie is beschikbaar met DEBUG=True.

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

ALso, if i remove the Stack in Docker, it somehow keeps the information. But cant find any Volume attached to it.

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

Nice.

See this: https://github.com/chiefonboarding/ChiefOnboarding/issues/319

Did you set the BASE_URL correctly? Otherwise, you can also set the CSRF_TRUSTED_ORIGINS to the cloudflare url (this time, it's full url, including https)

GDay avatar Feb 27 '25 22:02 GDay

But cant find any Volume attached to it.

Info only gets saved in the postgres database. You likely have a pgdata volume.

GDay avatar Feb 27 '25 22:02 GDay

But cant find any Volume attached to it.

Info only gets saved in the postgres database. You likely have a pgdata volume.

Nope, nothing like that in Volumes.

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

Ok, got it working now! https://prnt.sc/70rFKG0JwDrT

OxygenGS avatar Feb 27 '25 22:02 OxygenGS

Seems the DNS records did take quite long to update xD

OxygenGS avatar Feb 27 '25 22:02 OxygenGS