Unable to catch a request with method 'OPTIONS' in my proxy middleware
I'm using Django Rest Framework as backend API, in my nuxt 3 project I set up a proxy and it's working, except for requests with method "options". I use this method to retrieve the structure of the API from Django, my proxy is unable to catch the request and the client receives a 204 "no content" response from Nuxt, I think for CORS reasons, how can I pass the request to my proxy middleware?
2 Replies
you should be able to get the method and handle it accordingly via:
const method = getMethod(event);
https://www.jsdocs.io/package/h3#getMethodSomething like...