Skip to content

CORS: how is the AllowOriginFunc struct field meant to be unmarshalled from YAML? #2535

Closed
@jub0bs

Description

@jub0bs

Issue Description

The CORSConfig struct type has the following field:

AllowOriginFunc func(origin string) (bool, error) `yaml:"allow_origin_func"`

The field tag puzzles me. How is such a function meant to be unmarshalled from YAML?

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Version/commit

v4.11.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions