HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.7k stars 77 forks source link

Can't access dashboard via custom domain #162

Closed Steellow closed 2 years ago

Steellow commented 2 years ago

My domain (https://hanki.dev) works flawlessly for the blog. However lately for some reason I haven't been able to access the dashboard via hanki.dev (https://hanki.dev/dashboard), but I can access it via bearblog.dev (https://hanki.bearblog.dev/dashboard). I get some "form timed out" error

Reloading doesn't work, clearing cookies doesn't work. I've tried on both Chrome and Firefox on 2 different laptops

Any idea what causes this or how to fix it?

HermanMartinus commented 2 years ago

I'll take a look into it this week. Thanks for the report 👍

HermanMartinus commented 2 years ago

Can you confirm that this was ever working on your custom domain?

Steellow commented 2 years ago

Yep, was working just fine before. Last month the whole domain stopped working (something about SSL, can't remember, I changed some settings on Cloudflare which fixed it) but I'm not sure if the dashboard broke then or even earlier

HermanMartinus commented 2 years ago

Hmmm, cause it shouldn't have been working on custom domains before hand. What you're getting is a CSRF error in that a domain that isn't whitelisted by Django can't make POST requests (like login). I did, however, set up a reverse proxy to automatically handle SSL certificates about 2 months ago, which could have changed it for you.

I'm going to dig into this a bit more and see if I can figure it out. In the meantime you can use the dashboard on https://bearblog.dev/dashboard or https://subdomain.bearblog.dev/dashboard

HermanMartinus commented 2 years ago

This looks promising.

Steellow commented 2 years ago

Saw your latest commit, still doesn't seem to work

HermanMartinus commented 2 years ago

This took a lot of work to figure out, but it's resolved. Your dashboard should be available at your custom domain once more without any CSRF issues.

Steellow commented 2 years ago

Seems to be working, thanks!