mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Merge a2ff6b7285
into 452fd8e222
This commit is contained in:
commit
8adc19bd9f
|
@ -294,8 +294,8 @@ class APIView(View):
|
||||||
"""
|
"""
|
||||||
self.format_kwarg = self.get_format_suffix(**kwargs)
|
self.format_kwarg = self.get_format_suffix(**kwargs)
|
||||||
|
|
||||||
# Ensure that the incoming request is permitted
|
# Ensure that the incoming request is permitted. OPTIONS requests are always permitted.
|
||||||
if not self.has_permission(request):
|
if request.method != 'OPTIONS' and not self.has_permission(request):
|
||||||
self.permission_denied(request)
|
self.permission_denied(request)
|
||||||
self.check_throttles(request)
|
self.check_throttles(request)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user