django-subdomains
django-subdomains copied to clipboard
Doesn't account for differing port numbers in URLs
www.foo.com:8000
isn't recognised as being a subdomain of foo.com:9000
.
I ran into this problem when using port-forwarding on a Vagrant machine in which I was running a project with subdomains. The problematic code is in this method and is easily resolved by disregarding the port number.
I'd be more than happy to submit a PR for this if you think this issue is valid.
Current implementation of django-subdomains
is very tightly coupled with django sites framework. This is brings a lot of problems (e.g. you should explicitly create additional site in db even for local hosted sites). You can try to make a fork with fix from there:
https://github.com/tkaemming/django-subdomains/pull/23