[Django]-How can I disable/remove authorize button in swagger drf_yasg (maintain CSRF) – django

1👍

You can set the SECURITY_DEFINITIONS–(doc) to None or set it as per the OpenAPI schema definition,

SWAGGER_SETTINGS = {
    'SECURITY_DEFINITIONS': None
}
👤JPG

0👍

Remove this line in options:

.addBearerAuth()

-1👍

Yes, by using SUPPORTED_SUBMIT_METHODSin SWAGGER_SETTINGS
make it like SUPPORTED_SUBMIT_METHODS': [],

Leave a comment