RapidMiner

Rapidminer Server Webservice - Access-Control-Allow-Origin

Wisdom logo Registration now open for RapidMiner Wisdom Americas | New Orleans | October 10-12, 2018   Learn More
Learner I longy26
Learner I

Rapidminer Server Webservice - Access-Control-Allow-Origin

Hey all,

 

I successfully exposed a process as a webservice.

The Rapidminer Server is running locally on my machine.

I can make a request to the webservice through Postman, or the browser and get the expected result.

 

But only when I try to call the webservice from my angular2 website,

because of a missing 'Access-Control-Allow-Origin'.

 

XMLHttpRequest cannot load http://localhost:8080/api/rest/public/process/applyDT. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.

 

Where within the Rapidminer Server Settings can I setup the 'Access-Control-Allow-Origin' header?

 

I searched everywhere and couldn't find anybody with the same problem.

 

Any tips would be really appreciated.

Best regards,

Long

 

18 REPLIES
RM Certified Expert RM Certified Expert
RM Certified Expert

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Is your webservice exposed as anonymous or as your user? You might have to expose it as an anonymous user.

Regards,
Thomas

Blog: Neural Market Trends

RapidMiner Tutorial Videos here!
Learner I longy26
Learner I

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

The webservice is exposed as anonymous.

 

The process is stored at rapidminerserver/home/anonymous/...

I edited the access rights of the process, so that the anonymous user can do everything.

 

I query the webservice using the public link:

http://localhost:8080/api/rest/public/process/applyDT?

 

Anything missing?

 

Thanks for your help,

Long

RM Staff RM Staff
RM Staff

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Hi,

 

did you set: com.rapidanalytics.web.anonymous_services  to true?

--------------------------------------------------------------------------
Head of Data Science Services at RapidMiner
Learner I longy26
Learner I

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Hey @mschmitz

 

Yes, i've already set both

com.rapidanalytics.web.anonymous_resources 

com.rapidanalytics.web.anonymous_services 

to true.

 

Did not work unfortunately.

 

Thanks for your help,

Long

RM Staff RM Staff
RM Staff

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Hi Long,

 

did you check http://docs.rapidminer.com/server/administration/user-management/special-users.html ?

This page gives plenty of information on the user anonymous and how to allow webservice access to this user.

 

Best,

Edin

------------------------------------------------------------------------------------------------------------
How can I share my RapidMiner Process?
Where do I find the Logfile of RapidMiner Studio?
Where do I find the Logfile of RapidMiner Server?
Where do I find the Logfile of a RapidMiner Server Job Agent?
Where do I find the Logfile of a Process executed on a RapidMiner Server Job Agent?
------------------------------------------------------------------------------------------------------------
Learner I longy26
Learner I

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Hey @Edin_Klapic

 

I have read that documentation.

I followed it exactly as it is stated there.

 

The only thing that I was not able to follow was to give the anonymous user access rights to the webservice. In the documentation it says:

You can now set access rights to the web service. 
User anonymous also has rights to the corresponding process and all linked content, such as data and models.

I can't find any option to edit access rights to the web service. I can only edit the web service or test it.

 

The only thing I was able to do, was giving the anonymous user access rights to the process/resource, which the web service is using.

 

Best regards,

Long

 

 

Newbie chinthiti_w
Newbie

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Hi, @longy26

 

I have the same Access-Control-Allow-Origin problem. Have you found the solution? 

 

Regards

 

RM Staff RM Staff
RM Staff

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

Sorry, but I misunderstood your problem in the first place.

 

As for now you cannot set the HTTP response header values (e.g. Access-Control-Allow-Origin) to enable CORS with RapidMiner Server.

 

We are aware of this and put in on our roadmap. Nevertheless, I am not able to make any assumptions regarding the solution date since changing this requires quite some effort. Smiley Sad

 

Best regards,

Edin

 

------------------------------------------------------------------------------------------------------------
How can I share my RapidMiner Process?
Where do I find the Logfile of RapidMiner Studio?
Where do I find the Logfile of RapidMiner Server?
Where do I find the Logfile of a RapidMiner Server Job Agent?
Where do I find the Logfile of a Process executed on a RapidMiner Server Job Agent?
------------------------------------------------------------------------------------------------------------
Learner III steve_ware
Learner III

Re: Rapidminer Server Webservice - Access-Control-Allow-Origin

So the only immediate solution is to disable cross-domain access checks? How are RapidMiner Server, web-services intended to be used?

Please advise if you now have a plan for when this will be fixed.

 

Show-stopper.