Customizing APIRoute and Request
297
asterisk (
*
). The
allow_headers
parameter must also be part of the middleware to specify other
HTTP methods that need to be supported by the browser.
And lastly, the
max_age
parameter must
also be in the configuration because we need to tell the browser the amount of time it will cache all
the resources loaded into the browser.
If the application needs additional
CORS support features, customizing the
CORSMiddleware
to
extend some built-in utilities and features to manage CORS is a better solution.
By the way, it is not only the middleware that we can subclass and use to create custom implementations
of but also the
Request
data and API routes.
Chia sẻ với bạn bè của bạn: