Closed mattneel closed 4 years ago
Would it be possible to just pass the conn as an argument to the user-defined origin function in the following code?
https://github.com/mschae/cors_plug/blob/62e32b15c899e3afc10c609283118adaef7e663e/lib/cors_plug.ex#L82
I don't believe this breaks anything, and it would make achieving my use-case much easier (building cors domains based on assigns data).
I'd be happy to submit a PR if it would help.
Thanks, Matt
Hey @mattneel,
that makes sense to me, ideally we can support functions w/o conn (as we do right now) as well as ones that expect a conn.
If you would like to take a stab at this I won't stop you. :)
Thanks
Would it be possible to just pass the conn as an argument to the user-defined origin function in the following code?
https://github.com/mschae/cors_plug/blob/62e32b15c899e3afc10c609283118adaef7e663e/lib/cors_plug.ex#L82
I don't believe this breaks anything, and it would make achieving my use-case much easier (building cors domains based on assigns data).
I'd be happy to submit a PR if it would help.
Thanks, Matt