Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] on setting up sites to prevent DisallowedHosts error when deploying #28

Open
david-morris opened this issue May 11, 2022 · 3 comments
Labels

Comments

@david-morris
Copy link

If you don't have any sites configured on Wagtail (very possible if you're running headless) and don't have localhost in your Django ALLOWED_HOSTS, you'll get an error. But you can avoid adding localhost to your ALLOWED_HOSTS by setting up a site.

I figured this out by raising an issue against wagtail, maybe this should go somewhere in the readme?

@zerolab
Copy link
Member

zerolab commented May 11, 2022

Hey @david-morris,

That makes sense. Would you be able to submit a PR? I figure you're quite well placed to update the README from the point of view of someone who got bit by this

@david-morris
Copy link
Author

Sure, I'll talk Monday with my co-worker who made a migration to fix it automatically.

@berzi
Copy link

berzi commented Dec 23, 2023

This is often solved by installing the django-cors-headers package and adding its corsheaders to INSTALLED_APPS, or did this not solve the original issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants