mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-01 01:46:16 +00:00
Resolve angular dev auth warnings
This commit is contained in:
@@ -28,4 +28,6 @@ class DocumentsConfig(AppConfig):
|
|||||||
document_consumption_finished.connect(run_workflows_added)
|
document_consumption_finished.connect(run_workflows_added)
|
||||||
document_updated.connect(run_workflows_updated)
|
document_updated.connect(run_workflows_updated)
|
||||||
|
|
||||||
|
import documents.schema # noqa: F401
|
||||||
|
|
||||||
AppConfig.ready(self)
|
AppConfig.ready(self)
|
||||||
|
12
src/documents/schema.py
Normal file
12
src/documents/schema.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from drf_spectacular.extensions import OpenApiAuthenticationExtension
|
||||||
|
|
||||||
|
|
||||||
|
class AngularApiAuthenticationOverrideScheme(OpenApiAuthenticationExtension):
|
||||||
|
target_class = "paperless.auth.AngularApiAuthenticationOverride"
|
||||||
|
name = "AngularApiAuthenticationOverride"
|
||||||
|
|
||||||
|
def get_security_definition(self, auto_schema):
|
||||||
|
return {
|
||||||
|
"name": "Angular Authorization",
|
||||||
|
"description": "Automatic Angular authentication for the dev server",
|
||||||
|
}
|
Reference in New Issue
Block a user