mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-13 12:19:28 -05:00
Resolve angular dev auth warnings
This commit is contained in:
parent
1cadc034bd
commit
178d568574
@ -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",
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user