Allow CORS for Virtualmin Remote API

2 posts / 0 new
Last post
#1 Thu, 04/18/2019 - 09:12
Chumillas

Allow CORS for Virtualmin Remote API

Hi, I'm developing a frontend with Angular and consumes Virtualmin Remote API but my GET requests are getting denied because of CORS policy, error 401.

With Postman or cURL the GET request works fine but not with Angular 7 HttpClient, it's possible to set CORS policy in the Virtualmin Remote API and how?

My headers are:

"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json",
"cache-control": "no-cache",
Authorization: "Basic XXXXXXXXXXXXXXXXXXX"

I'm trying to get all the domains, example.com:10000/virtual-server/remote.cgi?json=1&program=list-domains

Sat, 04/27/2019 - 06:19
Chumillas

/bump

Topic locked