<?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 Re: Invalid CORS Request on Viya in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620010#M641</link>
    <description>&lt;P&gt;Thanks for the input.&amp;nbsp; I'm calling JobExecution services that were created at the backend using the client:secret (see&amp;nbsp;&lt;A href="https://github.com/macropeople/macrocore/blob/master/viya/mv_getapptoken.sas" target="_blank"&gt;https://github.com/macropeople/macrocore/blob/master/viya/mv_getapptoken.sas&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case I think I found the issue in this usage note:&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/kb/63/516.html" target="_blank"&gt;https://support.sas.com/kb/63/516.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It says to restart ALL services.&amp;nbsp; Will report back soon.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jan 2020 16:58:41 GMT</pubDate>
    <dc:creator>AllanBowe</dc:creator>
    <dc:date>2020-01-25T16:58:41Z</dc:date>
    <item>
      <title>Invalid CORS Request on Viya</title>
      <link>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620006#M639</link>
      <description>&lt;P&gt;After following the instructions &lt;A href="https://developer.sas.com/reference/cors/" target="_self"&gt;here&lt;/A&gt; I have whitelisted all domains as follows in SAS Environment Manager:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-01-25 at 17.18.59.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35622i56ACF6E919ECFB37/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-01-25 at 17.18.59.png" alt="Screenshot 2020-01-25 at 17.18.59.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also restarted the Web Server as described here:&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=calsrvpgm&amp;amp;docsetTarget=n00004viyaprgmsrvs00000admin.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=calsrvpgm&amp;amp;docsetTarget=n00004viyaprgmsrvs00000admin.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However when making local javascript ajax calls from a same-origin-policy disabled browser I still get the following response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-01-25 at 17.13.02.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35623iF734B3EB2826BAA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-01-25 at 17.13.02.png" alt="Screenshot 2020-01-25 at 17.13.02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue can be reproduced by visiting the following fiddle (in a CORS enabled browser instance), modifying line 18, opening developer tools, running the code and viewing network tab.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://jsfiddle.net/8Lzj3fmk" target="_blank" rel="noopener"&gt;https://jsfiddle.net/8Lzj3fmk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone advise?&amp;nbsp; How do I whitelist / use localhost when building web apps on Viya?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 16:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620006#M639</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-01-25T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid CORS Request on Viya</title>
      <link>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620008#M640</link>
      <description>&lt;P&gt;Hi Allan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure about what is happening with CORS , but am curious regarding your headers -&amp;nbsp; aren't you missing a client id : secret ? How have you registered your app (is it with password or impicit flow ) ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sundaresh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 16:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620008#M640</guid>
      <dc:creator>SundareshS</dc:creator>
      <dc:date>2020-01-25T16:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid CORS Request on Viya</title>
      <link>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620010#M641</link>
      <description>&lt;P&gt;Thanks for the input.&amp;nbsp; I'm calling JobExecution services that were created at the backend using the client:secret (see&amp;nbsp;&lt;A href="https://github.com/macropeople/macrocore/blob/master/viya/mv_getapptoken.sas" target="_blank"&gt;https://github.com/macropeople/macrocore/blob/master/viya/mv_getapptoken.sas&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case I think I found the issue in this usage note:&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/kb/63/516.html" target="_blank"&gt;https://support.sas.com/kb/63/516.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It says to restart ALL services.&amp;nbsp; Will report back soon.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 16:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620010#M641</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-01-25T16:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid CORS Request on Viya</title>
      <link>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620016#M642</link>
      <description>&lt;P&gt;That did it.&amp;nbsp; &amp;nbsp;For reference, just run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="1579971555.029100" class="c-virtual_list__item" tabindex="-1" role="listitem" aria-expanded="false"&gt;
&lt;DIV class="c-message_kit__background c-message_kit__background--hovered p-message_pane_message__message c-message_kit__message" role="document" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover c-message_kit__hover--hovered" role="document" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--default"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;&lt;/CODE&gt;&lt;/CODE&gt;
&lt;PRE&gt;sudo /etc/init.d/sas-viya-all-services stop
sudo /etc/init.d/sas-viya-all-services start&lt;/PRE&gt;
&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 25 Jan 2020 17:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Invalid-CORS-Request-on-Viya/m-p/620016#M642</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-01-25T17:46:49Z</dc:date>
    </item>
  </channel>
</rss>

