<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Content Security Policy Problem w/ Inappbrowser in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116604#M74287</link>
    <description>&lt;P&gt;I'm&amp;nbsp;calendar of events app a&amp;nbsp;calendar of events app that displays two buttons that use the inappbrowser plugin to display landing pages on two different websites.&lt;/P&gt;

&lt;P&gt;I'm also using the OneSignal Push plugin to be able to send periodic updates of the coming week's events. A week's worth of events can easily require more data than can be sent with a single notification, so I've created a WordPress REST API call that returns a JSON object to the function that handles when the user opens the notification.&lt;/P&gt;

&lt;P&gt;It's gibberish data, but it accurately reflects what's in the test database and can be viewed at:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://forgottencoastweekend.com/wp-json/fcw_weekly/v1/push" target="_blank"&gt;http://forgottencoastweekend.com/wp-json/fcw_weekly/v1/push&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In order to access the WP API I've had to add the line"&lt;/P&gt;

&lt;P&gt;&amp;lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' http://forgottencoastweekend.com"&amp;gt;&lt;/P&gt;

&lt;P&gt;to index.html, which lets the app access the API without triggering cross site posting problems.&lt;/P&gt;

&lt;P&gt;When that line gets added, the Inappbrowser plugin stops working, even though one of the landing pages is on Forgotten Coast Weekend!&lt;/P&gt;

&lt;P&gt;Any ideas on how to straighten this out??&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2016 00:19:59 GMT</pubDate>
    <dc:creator>Ed_T_</dc:creator>
    <dc:date>2016-12-16T00:19:59Z</dc:date>
    <item>
      <title>Content Security Policy Problem w/ Inappbrowser</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116604#M74287</link>
      <description>&lt;P&gt;I'm&amp;nbsp;calendar of events app a&amp;nbsp;calendar of events app that displays two buttons that use the inappbrowser plugin to display landing pages on two different websites.&lt;/P&gt;

&lt;P&gt;I'm also using the OneSignal Push plugin to be able to send periodic updates of the coming week's events. A week's worth of events can easily require more data than can be sent with a single notification, so I've created a WordPress REST API call that returns a JSON object to the function that handles when the user opens the notification.&lt;/P&gt;

&lt;P&gt;It's gibberish data, but it accurately reflects what's in the test database and can be viewed at:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://forgottencoastweekend.com/wp-json/fcw_weekly/v1/push" target="_blank"&gt;http://forgottencoastweekend.com/wp-json/fcw_weekly/v1/push&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In order to access the WP API I've had to add the line"&lt;/P&gt;

&lt;P&gt;&amp;lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' http://forgottencoastweekend.com"&amp;gt;&lt;/P&gt;

&lt;P&gt;to index.html, which lets the app access the API without triggering cross site posting problems.&lt;/P&gt;

&lt;P&gt;When that line gets added, the Inappbrowser plugin stops working, even though one of the landing pages is on Forgotten Coast Weekend!&lt;/P&gt;

&lt;P&gt;Any ideas on how to straighten this out??&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 00:19:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116604#M74287</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-16T00:19:59Z</dc:date>
    </item>
    <item>
      <title>I think that by adding the</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116605#M74288</link>
      <description>&lt;P&gt;I think that by adding the CSP rule you have changed how the inAppBrowser actions are monitored. What happens if you do not use any CSP rules and just use the whitelisting rules? I'm speculating, but you might start out doing something like this:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2016-12-15 at 17.14.46 .png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/9322iAF67F4274BD37AF9/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Screen Shot 2016-12-15 at 17.14.46 .png" alt="Screen Shot 2016-12-15 at 17.14.46 .png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 01:16:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116605#M74288</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-12-16T01:16:17Z</dc:date>
    </item>
    <item>
      <title>Paul,</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116606#M74289</link>
      <description>&lt;P&gt;Paul,&lt;/P&gt;

&lt;P&gt;That does fix the problem with the inappbrowser, but...&lt;/P&gt;

&lt;P&gt;Apparently, I'm back to the notification handler not being able to get the data from the WP REST API&lt;/P&gt;

&lt;P&gt;This is the code for the notification handler:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt; var notificationOpenedCallback = function(jsonData) {
 alert("In the callback");
    $.getJSON("http://forgottencoastweekend.com/wp-json/fcw_weekly/v1/push", function(response) {
	var records = JSON.stringify(response);
 alert(records);
    disp_data(records);    
        
	});
	  &lt;/PRE&gt;

&lt;P&gt;The second alert never displays. If I put the CSP meta in index.html, I get the data, but the inappbrowser fails.&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 05:34:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116606#M74289</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-16T05:34:14Z</dc:date>
    </item>
    <item>
      <title>Have you tried the very long</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116607#M74290</link>
      <description>&lt;P&gt;Have you tried the very long and overly permissive CSP rule from this doc page &amp;gt; &lt;A href="https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk" target="_blank"&gt;https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk&lt;/A&gt; &amp;lt; ?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 16:54:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116607#M74290</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-12-16T16:54:39Z</dc:date>
    </item>
    <item>
      <title>Yes, sir I have.</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116608#M74291</link>
      <description>&lt;P&gt;Yes, sir I have.&lt;/P&gt;

&lt;P&gt;InAppBrowser works, but the call to the API fails.&lt;/P&gt;

&lt;P&gt;I even went back to the CSP rule and added &lt;A href="http://forgottencoastweekend.com" target="_blank"&gt;http://forgottencoastweekend.com&lt;/A&gt; just behind 'self'&amp;nbsp; and rebuilt the app. No change.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 19:57:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116608#M74291</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-16T19:57:19Z</dc:date>
    </item>
    <item>
      <title>When you used the very long</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116609#M74292</link>
      <description>&lt;P&gt;When you used the very long permissive CSP rule:&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' data: blob: filesystem: ws: gap: file: cdvfile: &lt;A href="https://ssl.gstatic.com" target="_blank"&gt;https://ssl.gstatic.com&lt;/A&gt; *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; child-src *; "&amp;gt;&lt;/PRE&gt;

&lt;P&gt;Did you continue to use the whitelist rules I gave you?&lt;/P&gt;

&lt;P&gt;Which version of jQuery are you using? See this FAQ &amp;gt; &lt;A href="https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail" target="_blank"&gt;https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail&lt;/A&gt; &amp;lt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 22:15:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116609#M74292</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-12-16T22:15:33Z</dc:date>
    </item>
    <item>
      <title>Oh, wow Paul, you hit the</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116610#M74293</link>
      <description>&lt;P&gt;Oh, wow Paul, you hit the nail on the head, but for a different reason enirely than what you were thinking.&lt;/P&gt;

&lt;P&gt;I updated to 3759 yesterday or the day before, and rebuilt the app from scratch. I picked an HTML5 Cordova app with App Designer.&lt;/P&gt;

&lt;P&gt;APP Designer didn't install jQuery at all!!&amp;nbsp; I've since added it manually. I went back and looked at the original app and it was using jQuery 2.2.4 so that's what I plugged in instead of the new ver 3 of JQ.&lt;/P&gt;

&lt;P&gt;Now I have the whitelist entries you suggested and an overly permissive CSP meta tag,but the call to the WP REST API is working like a champ.&lt;/P&gt;

&lt;P&gt;So, I guess I have to go back and start removing CSP and whitelist settings to see if I can find a minimalist one that is compatible with inappbrowser and jquery.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 23:35:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116610#M74293</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-16T23:35:01Z</dc:date>
    </item>
    <item>
      <title>Paul,</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116611#M74294</link>
      <description>&lt;P&gt;Paul,&lt;/P&gt;

&lt;P&gt;Once jQuery was included I was able to remove the ultra permissive CSP tag. The whitelist settings you suggested are working.&lt;/P&gt;

&lt;P&gt;Leave them that way, or try a different CSP?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Ed&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 17:58:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116611#M74294</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-17T17:58:36Z</dc:date>
    </item>
    <item>
      <title>Either way will work.</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116612#M74295</link>
      <description>&lt;P&gt;Either way will work. Ultimately CSP is probably the better choice, but it might be easier at this time to use the whitelist approach.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 04:00:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116612#M74295</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-12-18T04:00:18Z</dc:date>
    </item>
    <item>
      <title>I will leave it using the</title>
      <link>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116613#M74296</link>
      <description>&lt;P&gt;I will leave it using the whitelist approach.. Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 21:02:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Content-Security-Policy-Problem-w-Inappbrowser/m-p/1116613#M74296</guid>
      <dc:creator>Ed_T_</dc:creator>
      <dc:date>2016-12-21T21:02:29Z</dc:date>
    </item>
  </channel>
</rss>

