age page 2 - Dave's Blog

Search
My timeline on Mastodon

Windows Store App WebView Cross Origin XMLHttpRequest Behavior

2016 Jun 2, 6:45

TL;DR: Web content in a JavaScript Windows Store app or WebView in a Windows Store app that has full access to WinRT also gets to use XHR unrestricted by cross origin checks.

By default web content in a WebView control in a Windows Store App has the same sort of limitations as that web content in a web browser. However, if you give the URI of that web content full access to WinRT, then the web content also gains the ability to use XMLHttpRequest unrestricted by cross origin checks. This means no CORS checks and no OPTIONS requests. This only works if the web content's URI matches a Rule in the ApplicationContentUriRules of your app's manifest and that Rule declares WindowsRuntimeAccess="all". If it declares WinRT access as 'None' or 'AllowForWebOnly' then XHR acts as it normally does.

In terms of security, if you've already given a page access to all of WinRT which includes the HttpRequest class and other networking classes that don't perform cross origin checks, then allowing XHR to skip CORS doesn't make things worse.

PermalinkCommentsjavascript uwa uwp web webview windows winrt xhr

Tweet from David Risney

2016 Jun 2, 4:40
Answering the important questions: Tab v Spaces https://ukupat.github.io/tabs-or-spaces/  Broken down by programming language & using GitHub as population
PermalinkComments

Tweet from David Risney

2016 Jun 1, 1:51
Cool JS image diff'ing including browser webcam based demos https://twitter.com/lonekorean/status/737630487913455616 
PermalinkComments

Tweet from Gregory Schier

2016 May 17, 5:11
Thanks @elmlang for the most useful error message I've ever seen
PermalinkComments

Tweet from David Risney

2016 Apr 8, 4:52
@_lance_leonard @ericlaw First thought was confusion as to why Logo was getting used in production https://en.wikipedia.org/wiki/Logo_(programming_language) 
PermalinkComments

Tweet from Kumail Nanjiani

2016 Apr 5, 11:22
Terrified that the will reveal I never beat Dragon Age: Inquisition.
PermalinkComments

Retweet of xeni

2016 Feb 25, 10:15
Yep. #nightlyshow pic.twitter.com/EUX3uVTBPH
PermalinkComments

Retweet of Snowden

2016 Feb 23, 9:19
@SwiftOnSecurity @thegrugq What if you have a lot of NSA rootkit problems? Asking for a friend.
PermalinkComments

Retweet of lukeweston

2016 Feb 20, 2:10
Great work there record companies. pic.twitter.com/gjk8cruICP
PermalinkComments

Tweet from David_Risney

2016 Feb 20, 1:40
Preview of Obama's post presidency standup tour @CSPANVL http://www.c-span.org/video/?c4558279/obama-ribs-republicans-candidates …
PermalinkComments

Retweet of xeni

2016 Feb 20, 1:22
If the #BernieSanders campaign lacked punk street cred before, they got it now. Them's some optics indeed. pic.twitter.com/g1sv86YAvH
PermalinkComments

Tweet from David_Risney

2016 Feb 17, 3:30
Well done, tense, fake Back to the Future prequel trailer: http://www.avclub.com/article/tense-prequel-fully-explores-back-futures-terroris-232391 …. Doc must trick terrorists into giving him plutonium.
PermalinkComments

Retweet of timbray

2016 Feb 17, 1:07
Super-cool unicode character search: http://www.amp-what.com/unicode/search/check …
PermalinkComments

Retweet of SwiftOnSecurity

2016 Feb 16, 5:06
#MustRead Apple CEO Tim Cook's letter to customers on FBI's request for assistance hacking an iPhone 5c http://www.apple.com/customer-letter/ …
PermalinkComments

Retweet of erewok

2016 Feb 16, 5:22
This guy sped by me on the freeway. Had a strong feeling this was a Unicode codepoint. In my gut I knew what it was. pic.twitter.com/4B3oHSXXAi
PermalinkComments

Tweet from David_Risney

2016 Feb 16, 2:06
OK Go's beef with YouTube led to latest video release on Facebook: http://www.adweek.com/news/technology/why-ok-go-went-facebook-only-debut-its-buzzy-zero-gravity-music-video-169599 …
PermalinkComments

Retweet of FakeUnicode

2016 Feb 12, 7:25
> typeof NaN 'number' > (╯°□°)╯︵ ┻━┻) ...
PermalinkComments

Retweet of BetaHorton

2016 Feb 12, 1:52
I want to live in a world where coding is as awesome as it appears in the movies #Hackers #NeedASkateboard pic.twitter.com/ai1JkrarTH
PermalinkComments

Retweet of CNNnewsroom

2016 Feb 11, 11:54
That time @BernieSanders & @realDonaldTrump joined @BrookeBCNN live on her set (kinda) h/t @TonyAtamanuik @JAdomian
PermalinkComments

Retweet of Ghostbusters

2016 Feb 11, 11:08
Whether you have a date or not, the world ends on Valentine's Day. Bummer. #Ghostbusters
PermalinkComments
Older EntriesNewer Entries Creative Commons License Some rights reserved.