3cn-ecn / nantralPlatform

Nantral Platform is a website project for clubs, events and more in Centrale Nantes
https://nantral-platform.fr
MIT License
21 stars 2 forks source link

413 error #1019

Closed hydrielax closed 1 year ago

hydrielax commented 1 year ago

Description

Correct a bug to effectively show the 413 error page.

What was the bug? When a 413 error happen (ie when the size of the file sent to the server is greater than 5Mio), django was supposed to handle the error and show a custom page explaining to the user what was the problem. However, the file size limit is not defined in django but in nginx, so the custom page was not displayed.

How did we correct it? Define the custome page for the error 413 in nginx directly and not in django.

Tests

To see the page, try to send a file which is heavier than 5Mio.

Screenshots

image

sonarcloud[bot] commented 1 year ago

[Nantral Platform Backend] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information