After following the instructions here I have whitelisted all domains as follows in SAS Environment Manager:
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:
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.
Can anyone advise? How do I whitelist / use localhost when building web apps on Viya?
That did it. For reference, just run:
sudo /etc/init.d/sas-viya-all-services stop sudo /etc/init.d/sas-viya-all-services start
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
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.
That did it. For reference, just run:
sudo /etc/init.d/sas-viya-all-services stop sudo /etc/init.d/sas-viya-all-services start
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.
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.
Ready to level-up your skills? Choose your own adventure.