Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make AJAX request to third party server from MS Office add-in

I am trying to get a jQuery GET request out from my Office (Outlook) add-in, but am only getting the error message "Access denied". Documentation is really sparse, or at least hard to find, at this point. Anyone know what could be wrong?

like image 446
nforss Avatar asked Sep 26 '22 14:09

nforss


People also ask

Can I send AJAX request to another domain?

Cross-origin resource sharing (or CORS) can be used to make AJAX requests to another domain.

What would you enable to allow a browser on another site to make an AJAX request to your apt?

CORS Proxy Servers can specify that they want browsers to allow other websites to request resources they host. CORS Proxy is simply an HTTP Proxy that adds a header to responses saying "anyone can request this".


1 Answers

After much searching, I happened upon the solution by chance. In the file add-in manifest file, there is a tab where one can whitelist domains for requests. Just add the domain in question, and you should be golden.

like image 51
nforss Avatar answered Nov 15 '22 09:11

nforss