Skip to content

trusted-origins argument incorrectly quoted causing origin validation errors #182

@fabian4613

Description

@fabian4613

trusted-origins argument incorrectly quoted causing origin validation errors

Description

The Portainer Helm chart currently generates the --trusted-origins argument with extra double quotes around the domain value due to the use of the quote filter in the template. This causes Portainer to reject the origin with an origin invalid error.

Steps to Reproduce

  1. Deploy Portainer with trusted_origins.domains set in values.yaml to portainer.example.com.
  2. The Pod receives the argument as --trusted-origins="portainer.example.com" (including the quotes).
  3. Portainer logs show the error:
    Failed to validate Origin or Referer | error="origin invalid"
    

Suggested Fix

Remove the quote filter from the template so that the argument is passed without extra quotes:

- '--trusted-origins={{ .Values.trusted_origins.domains | trim }}'

This results in the argument being:

--trusted-origins=portainer.example.com

which Portainer accepts correctly.

Additional Notes

This issue causes confusion and requires manual workarounds to avoid invalid origin errors in Portainer deployments behind reverse proxies.


Thank you for considering this fix!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions