How I Schedule Jobs using Crontab

Cron is a program that allows Unix users to automatically run tasks (scripts, commands, software…) at a pre-defined date and time. These tasks are called cron jobs and can be used for example…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Secure Your Django Application

Security is the most precious part of any application or website. A sensuous developer always focuses on security. If you're developing any web-app using Django, you must follow the procedures mentioned in this tutorial to secure your web-app.

When deploying the django application for production you must set DEBUG=False in settings.py. Because when DEBUG=True, it shows full tracebacks in the browser when an error is occurred and hence it will leak lots of information about your project: excerpts of your source code, local variables, settings, libraries used, etc.

Python provides several packages to work with environment variables. In this tutorial we will use django-environ and python-decouple to fetch data value from the environment.

For example, the contents of the .env file can be:

Add the below code in your settings.py

Add the following configurations in the settings.py.

Let the domain of your website is example.com.

Add the following configurations in the settings.py.

Let the domain of your website is example.com.

Add the following configurations in the settings.py.

For security purposes, it is a good practice to disable CORS on your site. Enabling CORS is dangerous since it allows other sites to make cross-origin requests to your site.

Clickjacking attack occurs when a malicious site tricks a user into clicking on a concealed element of another site which they have loaded in a hidden frame or iframe.

DoS is a type of attack, in which the attacker sends too much traffic/request to a server and the server can’t handle this flood of traffic due to limited memory and resources, hence the server will be crashed. To prevent this attack you must restrict the users’ request. For example, you can restrict that the users can only send only 1000 requests per hour to your site.

When DEBG is False Django sends the server errors with full traceback to the ADMINS. For security reasons, the error reports sent to the Admins’ email must not contain sensitive information, because if anybody gets access of the admin’s email, the person can gain that sensitive information.

To check the securities and vulnerabilities of your site you can use the following online tools -

Thanks for following these procedures. Always secure your sites.

Add a comment

Related posts:

ENAMORADOS

Ainda fresca a tinta do soneto, Entrega à sua amada a fina escrita. Ela lê d’olhos baixos, mas se agita Surpreendida pelo último terceto. Ali revela quanto houve secreto O amor que até então foi só…

MixMarvel Award Questionnaire

In order to give back to the player’s long-term support for MixMarvel products, such as HyperDragons, HyperSnakes and so on, the official team decides to conduct an Award Questionnaire of the…

How to Speed up your UI Design Process with AI

Research is a crucial part of the UI design process. It helps us understand our target audience and create designs that meet their needs. AI can be a great help during the research phase of UI…