distinguish allowed_hosts and cors_origin_regex_whitelist in django?

0 votes
I don't understand the difference between allowed_host and cors_origin_regex_whitelist in django settings.
Jul 6, 2018 in DevOps Tools by DragonLord999
• 8,360 points
73 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

ALLOWED_HOSTS as in docs is quite self explanatory

A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations

CORS_ORIGIN_REGEX_WHITELIST

This variable expects a third party package django-cors-headers. If a browser starts a request through JS to another domain, it will send an OPTIONS request to know if the server is letting the domain accept request by checking Access-Control-Allow-Origin header. There are some other headers also using this like Access-Control-Allow-Headers , etc.

answered Jul 6, 2018 by ajs3033
• 7,000 points

Related Questions In DevOps Tools

+1 vote
3 answers

How do I check and export sonarqube analysis reports in embedded db?

Browse to sonarqube web instance to access ...READ MORE

answered Jul 2, 2018 in DevOps Tools by DareDev
• 6,520 points
1,459 views
0 votes
1 answer
0 votes
3 answers
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Logs in phoenix web app deployed using edeliver

The newer versions of edilever and distillery ...READ MORE

answered Jun 19, 2018 in DevOps Tools by ajs3033
• 7,000 points
24 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.