[Catalyst] Access-Control-Allow-Origin

Dimitar Petrov mitakaa at gmail.com
Fri Jun 15 13:41:03 GMT 2018


You can also consider using a Plack middleware:
https://metacpan.org/pod/Plack::Middleware::CrossOrigin

Cheers,
-- Dimi

On Fri, Jun 15, 2018 at 3:07 PM, David Dorward <david at dorward.me.uk> wrote:

> cOn 15 Jun 2018, at 13:54, Theo Bot wrote:
>
>> Can anybody tell me to to add an "Access-Control-Allow-Origin" in the
>> header:
>>
>> I've tried "$c->response->header('Access-Control-Allow-Origin' => '*');
>>
>
> That's how you do it.
>
> But I don't see it in the response
>>
>
> Is that line of code actually running for the response?
>
> Have you put it on the wrong route by mistake?
>
> Are you putting it on the response for a POST or GET request when the
> browser is making a preflight OPTIONS request which isn't being handled by
> that?
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ca
> talyst at lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20180615/ddc30b0e/attachment.htm>


More information about the Catalyst mailing list