... st normalizes header names following WSGI conventions, mapping hyphens to underscores. As a result, even in configurations where reverse proxies carefully strip security-sensitive headers named with hyphens, ... such a header could be spoofed by supplying a header named with underscores. Under WSGI, it is the responsibility of the server or proxy to avoid ambiguous mappings. (Django's runserver was patched ... t the same uniform expectation, even if many proxies protect against this under default configuration (including nginx via underscores_in_headers off; ). Headers containing underscores are now ignored by ASGIRequest , matching the behavior of Daphne , the r ... ... st normalizes header names following WSGI conventions, mapping hyphens to underscores. As a result, even in configurations where reverse proxies carefully strip security-sensitive headers named with hyphens, ... such a header could be spoofed by supplying a header named with underscores. Under WSGI, it is the responsibility of the server or proxy to avoid ambiguous mappings. (Django's runserver was patched ... t the same uniform expectation, even if many proxies protect against this under default configuration (including nginx via underscores_in_headers off; ). Headers containing underscores are now ignored by ASGIRequest , matching the behavior of Daphne , the r ... ... oofing via underscore/hyphen conflation ASGIRequest normalizes header names following WSGI conventions, mapping hyphens to underscores. As a result, even in configurations where reverse proxies carefully strip security-sensitive headers named with hyphens, ... such a header could be spoofed by supplying a header named with underscores. Under WSGI, it is the responsibility of the server or proxy to avoid ambiguous mappings. (Django's runserver was patched ... t the same uniform expectation, even if many proxies protect against this under default configuration (including nginx via underscores_in_headers off; ). Headers containing underscores are now ignored by ASGIRequest , matching the behavior of Daphne , the r ... ... d into the WSGI environ, they are normalized by converting to uppercase, converting all dashes to underscores, and prepending HTTP_ . For instance, a header X-Auth-User would become HTTP_X_AUTH_USER in the WSGI environ (and thus als ... nfortunately, this means that the WSGI environ cannot distinguish between headers containing dashes and headers containing underscores: X-Auth-User and X-Auth_User both become HTTP_X_AUTH_USER . This means that if a header is used in a security-sensitive wa ... ore) and bypass this protection. In order to prevent such attacks, both Nginx and Apache 2.4+ strip all headers containing underscores from incoming requests by default. Django's built-in development server now does the same. Django's development server is ... ... uppercase, converting all dashes to underscores, and prepending HTTP_ . For instance, a header X-Auth-User would become HTTP_X_AUTH_USER in the WSGI environ (and thus als ... nfortunately, this means that the WSGI environ cannot distinguish between headers containing dashes and headers containing underscores: X-Auth-User and X-Auth_User both become HTTP_X_AUTH_USER . This means that if a header is used in a security-sensitive wa ... ore) and bypass this protection. In order to prevent such attacks, both Nginx and Apache 2.4+ strip all headers containing underscores from incoming requests by default. Django's built-in development server now does the same. Django's development server is ... ... ting to uppercase, converting all dashes to underscores, and prepending HTTP_ . For instance, a header X-Auth-User would become HTTP_X_AUTH_USER in the WSGI environ (and thus als ... nfortunately, this means that the WSGI environ cannot distinguish between headers containing dashes and headers containing underscores: X-Auth-User and X-Auth_User both become HTTP_X_AUTH_USER . This means that if a header is used in a security-sensitive wa ... ore) and bypass this protection. In order to prevent such attacks, both Nginx and Apache 2.4+ strip all headers containing underscores from incoming requests by default. Django's built-in development server now does the same. Django's development server is ... ... ting code to adjust the formatting method. Avoid use of "we" in comments, e.g. "Loop over" rather than "We loop over". Use underscores, not camelCase, for variable, function and method names (i.e. poll.get_unique_voters() , not poll.getUniqueVoters() ). Use ... request , foo ): ... Don't do this: def my_view ( req , foo ): ... Model style Field names should be all lowercase, using underscores instead of camelCase. Do this: class Person ( models . Model ): first_name = models . CharField ( max_length = 20 ) last_n ... ... o the HTTP_X_AUTH_USER key in request.META , you must also check that your web server doesn't allow a spoofed header using underscores in place of dashes. Under WSGI, this warning doesn't apply to RemoteUserMiddleware in its default configuration with heade ... ... arate values. sep cannot be in the URL safe base64 alphabet . This alphabet contains alphanumeric characters, hyphens, and underscores. algorithm must be an algorithm supported by hashlib , it defaults to 'sha256' . fallback_keys is a list of additional val ... ... of the action to be rendered in the admin. If description is not provided, Django renders the function's name, converting underscores to spaces and capitalizing the first letter of the first word. This sets the short_description attribute on the function. ... 2026年10月08日