Skip to content

Configurable Paperless external URL, for history backlink (Kubernetes use case) #854

@BenGig

Description

@BenGig

Is your feature request related to a problem? Please describe.
In a Kubernetes environment, with paperless-ai running in the same namespace as Paperless, the configured link for paperless-ai to access Paperless ideally is the internal service URL, i.e. http://paperless:8000, avoiding the ingress, and TLS which is overhead. Besides a more direct connection not leaving the k8s namespace, this also avoids any hassle with certificates signed by a custom CA which paperless-ai rejects.

From outside of Kubernetes, the URL above is not valid. Now: in the history, entries are linked back to the PDF in Paperless using the unreachable invalid internal URL.

Describe the solution you'd like
Introduce a variable PAPERLESS_EXTERNAL_URL. When rendering the history, check if this variable is set. If no, use PAPERLESS_URL, if yes: use PAPERLESS_EXTERNAL_URL

Describe alternatives you've considered
Enable the use of custom root certificates. More work to implement. Would solve the more universal issue with root CAs not in the certificate store, but not the inefficient network route passing an additional ingress and TLS connection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions