Skip to content

Looks like init function is called during the compile timeΒ #89

@oleg-kivra

Description

@oleg-kivra

Hey,

I have a bit strange case for me. E.g. I can not override the settings with Application config. As far as I see it happens because the init function is called during the compile time, and options are just automatically passed to the call function. So to summarize I cant use configs in runtime in order to set different origins.

It looks like its a behaviour expected by Phoenix: https://hexdocs.pm/plug/Plug.html#c:init/1

The result returned by init/1 is passed as second argument to call/2. Note that init/1 may be called during compilation and as such it must not return pids, ports or values that are specific to the runtime.

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