Re: [foaf-dev] Enabling CORS on xmlns.com for browser .js access to FOAF and WOT vocab documentation
Dan Brickley <[email protected]> Mon, 16 Jan 2012 15:11:17 +0100
| Newsgroups | gmane.comp.web.rdfweb |
|---|---|
| Message-ID | <CAFNgM+aCeS-H3V50eCcMagc8uwLoTPhGNvXAQszwhw0USorvHg@mail.gmail.com> |
On 16 January 2012 15:05, Melvin Carvalho <[email protected]> wrote: > On 16 January 2012 11:27, Dan Brickley <[email protected]> wrote: >> On 16 Jan 2012, at 11:23, Michael Hausenblas <[email protected]> wrote: >> >>> >>> Did you check http://enable-cors.org/#how-apache already? >>> >> >> Yup, and checked with the checktastic checker too. Those docs led me to use a virtualhost-wide 'set' header instruction instead of a per-directory .htaccess 'add'... > > From Joe > > Header always set Access-Control-Allow-Origin * > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule (.*) http://xmlns.com/foaf/0.1/$1 [R=303] I've just tried variants of these in the server-side config, i.e. <VirtualHost *:80> ServerAdmin [email protected] ServerName xmlns.com # Header always set Access-Control-Allow-Origin * early Header always set Access-Control-Allow-Origin * ... with no change (as far as the enable-cors.org checker at least, with http://xmlns.com/foaf/0.1/Person ) I think we previously had a setup closer to the above, but it was redirecting 303s even with URLs that should be 404, hence the more enumerated style now. Is the suggestion that the 'always' version could be added to http://svn.foaf-project.org/foaf/trunk/xmlns.com/htdocs/foaf/0.1/.htaccess as-is, or it needs a major re-org? Dan