I wrote an API using the Django Rest Framework. For authentication, I use django-oauth2-provider: https://github.com/caffeinehit/django-oauth2-provider
I have the settings configured on my settings page like this (using the Corsheaders middleware.)
MIDDLEWARE_CLASSES = ( ... 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', ... ) CORS_ORIGIN_ALLOW_ALL = True # Dangerous (using for testing purposes)
My client application is built using Angular JS. However, every time we make any request (including GET requests), a parameter request is sent. This request for parameters takes ~ 50 - 500 ms depending on the request.
The api calls look like this: https://example.com/api/v1/posts/?page=1 (2, 3, 4 ... etc.) "
I need to wrap my head around why this request is being executed, and how to improve performance for the application.
source share