[Catalyst] Providing a REST API from behind Apache/FastCGI?

John Napiorkowski jjn1056 at yahoo.com
Thu Nov 14 13:17:50 GMT 2013



Sent from my iPhone

> On Nov 11, 2013, at 9:50 PM, Dan Lowe <dan at tangledhelix.com> wrote:
> 
> 
>> On Nov 11, 2013, at 3:51 PM, brainbuz <brainbuz at brainbuz.org> wrote:
>> 
>> Newer versions of apache make some security changes
>> so apache, even though you don't think any access control is being applied on the server side,
>> might be blocking it by default (although that should be a 403 rather than 401).
>> 
>> You could try a block like this:
>> 
>> <Location /uri_for/my/app.fcgi>
>> Order Allow,Deny
>> Allow From All
>> Satisfy Any
>> </Location>
> 
> That did not work unfortunately... but I have found that the data I need is available in $c->engine->env->{Authorization}, so I'll see what I can do with that.

Just FYI but ->env is attached to the request obj in more modern versions of catalyst.  You might want to write a bit of wrapper logic there to check on then the other such as to ease any future upgrades 

Jnap 

> I'll also look at starman and see if that improves things.
> 
> Thanks,
> Dan
> 
> 
>> 
>> I wrote an article on deploying starman with apache in the 2011 catalyst advent calendar, with some errata on my blog, you might want to consider switching, although you would still run afoul of tighter apache defaults if that is indeed your problem.
> 
> 
> 
> _______________________________________________
> 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/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list