W3C home > Mailing lists > Public > public-json-ld-wg@w3.org > April 2019

Re: Playground error or schema.org error?

From: David I. Lehn <dil@lehn.org>
Date: Thu, 4 Apr 2019 14:12:26 -0400
Message-ID: <CADcbRRNYZR1yJw9WW8yeuKs4jHqRYVG+cgFvU-JL=+bV1mBzEA@mail.gmail.com>
To: Pierre-Antoine Champin <pierre-antoine.champin@univ-lyon1.fr>
Cc: "Cole, Timothy W" <t-cole3@illinois.edu>, Richard Wallis <richard.wallis@dataliberate.com>, Ivan Herman <ivan@w3.org>, Dan Brickley <danbri@google.com>, Gregg Kellogg <gregg@greggkellogg.net>, W3C JSON-LD Working Group <public-json-ld-wg@w3.org>
On Thu, Apr 4, 2019 at 12:03 PM Pierre-Antoine Champin <
pierre-antoine.champin@univ-lyon1.fr> wrote:

> The only URL that works for me in the playground is "http://schema.org",
> and this is indeed because it does *not* query the original URL, but
> instead:
> https://json-ld.org/playground/proxy.php?url=http://schema.org
> For any other variant, the original URL is requested,
> and the console displays a Cross-Origin Request error message on the 2nd
> request
> (i.e. after the succesful redirection).
> This is *definitely* related to the fact that
>     https://schema.org/docs/jsonldcontext.json
> is missing the header
>     access-control-allow-origin: *
To clarify some of the odd playground behavior, there is a hack in there
[1] to handle "http://schema.org/" (with the trailing slash).  It will
rewrite to https to avoid mixed security issues.  Any other urls that are
not https will use the proxy, including "http://schema.org" (w/o the
trailing slash).  That code should really change all schema.org urls to
https.  An oversight that it didn't do that before, but at the moment a fix
would break the version w/o trailing slash.  It does appear that when not
using the proxy it's just a CORS issue.  It would be nice to fallback to
the proxy if CORS fails, but I don't think there is a way to detect that is
the cause of a failure.



(image/jpeg attachment: image001.jpg)

Received on Thursday, 4 April 2019 18:13:01 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 4 April 2019 18:13:02 UTC