CORS for my phoenix channels - cors_plug vs corsica?

I’m curious what the difference is between cors_plug and corsica – all I need to do is add CORS to my phoenix channels.

1 Like

They’re roughly the same. Corsica allows for some more customization of specific routes if you have such needs, but can do the generic plug Corsica thing same as CorsPlug. As far as I remember CorsPlug has more permissive defaults while Corsica wants you to be specific about the stuff you allow (it’s not safer in any way, just the defaults are stricter and admittedly sometimes more annoying if the needs are simple :smile:).

Oh and you get a free $25 Amazon gift card if you adopt Corsica, or so I’ve been told by its author which in all fairness is considered a buffoon in the community, so take it with a pinch of salt :stuck_out_tongue: (disclaimer: I’m the author of Corsica)

8 Likes

I think it is worth mentioning that Phoenix Channels that run over websockets should use check_origin, not CORS.

1 Like