BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AllanBowe
Barite | Level 11

After following the instructions here I have whitelisted all domains as follows in SAS Environment Manager:

 

Screenshot 2020-01-25 at 17.18.59.png

 

I have also restarted the Web Server as described here:  https://documentation.sas.com/?docsetId=calsrvpgm&docsetTarget=n00004viyaprgmsrvs00000admin.htm&docs...

 

However when making local javascript ajax calls from a same-origin-policy disabled browser I still get the following response:

 

Screenshot 2020-01-25 at 17.13.02.png

 

 

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.

 

https://jsfiddle.net/8Lzj3fmk

 

 

Can anyone advise?  How do I whitelist / use localhost when building web apps on Viya?

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
1 ACCEPTED SOLUTION

Accepted Solutions
AllanBowe
Barite | Level 11

That did it.   For reference, just run:

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

View solution in original post

3 REPLIES 3
SundareshS
Obsidian | Level 7

Hi Allan,

 

I am not sure about what is happening with CORS , but am curious regarding your headers -  aren't you missing a client id : secret ? How have you registered your app (is it with password or impicit flow ) ?

 

regards

Sundaresh

 

AllanBowe
Barite | Level 11

Thanks for the input.  I'm calling JobExecution services that were created at the backend using the client:secret (see https://github.com/macropeople/macrocore/blob/master/viya/mv_getapptoken.sas)

 

In any case I think I found the issue in this usage note:  https://support.sas.com/kb/63/516.html

 

It says to restart ALL services.  Will report back soon.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
AllanBowe
Barite | Level 11

That did it.   For reference, just run:

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4734 views
  • 0 likes
  • 2 in conversation