Replies: 4 comments 16 replies
-
ALLOWED_HOSTS contains the list of hostnames that the Netbox server itself is known as to the outside world. If you put an IP address here, then it's the IP address of the server itself, not the IP address of the load balancer or client. For example, if your server is running on address 10.11.12.13, and you want people to be able to access it as If the loadbalancer is making healthchecks then you ought to be able to tell it which hostname to use (since any web server could be running multiple virtual hosts anyway, and you'll need to specify which one to check) Therefore, I don't really see your use case for a CIDR range. Are you saying that the IP address of the Netbox server itself changes dynamically? Or you have a pool of Netbox front-end servers? Even then, the loadbalancer should be setting a Host: header so that it's testing |
Beta Was this translation helpful? Give feedback.
-
Someone please tell me again in which cases is setting CSRF_TRUSTED_ORIGINS required? I mean, I have it in some of my older configs, but in the latest 3.7.0 test installations I haven't set it, and everything seems to work just fine. I'm running non-TLS NetBox on EC2 behind the ALB (that does TLS offloading): client -> ALB -> nginx -> gunicorn (NetBox) |
Beta Was this translation helpful? Give feedback.
-
Yes you're right: on my system
So I think you're right, this isn't needed at all normally - maybe only for very weird situations where you have a different website which includes a form which POSTs to Netbox. Django docs |
Beta Was this translation helpful? Give feedback.
-
FYI, |
Beta Was this translation helpful? Give feedback.
-
I've put a load balancer in front of Netbox, with TLS terminated on the load balancer. To make this work I use these settings:
The load balancer does periodic healthchecks on Netbox's HTTP endpoint, so I would prefer using a CIDR range here like
100.64.0.0/10
. This doesn't work, it returns 400 error. I don't think it's a big deal, since I restrict HTTP ingress to only the load balancer, but would it be better to allow CIDR ranges here, and perhaps also partial wildcards like*.mydomain.net
?Beta Was this translation helpful? Give feedback.
All reactions