edrikL / gears

Automatically exported from code.google.com/p/gears
2 stars 3 forks source link

breakdown worker origin into protocol/domain/port #647

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently whitelist checking of cross-domain worker requests is awkward. It
would be far simpler if direct access could be given protocol/domain/port
without requiring the user to parse them by hand.

Original issue reported on code.google.com by f...@google.com on 7 Aug 2008 at 3:42

GoogleCodeExporter commented 9 years ago
Since the origin string is normalized, you should be able to split on ':' which 
gives
(protocol, //host, [port]).  Out of curiosity, did you find yourself needing
something more complicated?

(And FWIW, your suggestion has come up on the HTML5 worker discussion too.  The 
spec
is in flux, we'll see what happens there.)

Original comment by gears.te...@gmail.com on 7 Aug 2008 at 6:55

GoogleCodeExporter commented 9 years ago
See, I didn't even think of that (half-illustrating my point), though that 
would have
done it, other than the pesky trouble of dealing with the // when doing a host
comparison.

Original comment by f...@google.com on 7 Aug 2008 at 7:01