Skip to Content
0
Jun 05, 2020 at 10:19 AM

SAP WEB IDE - Service layer - blocked by CORS policy: No 'Access-Control-Allow-Origin'

936 Views Last edit Jun 05, 2020 at 10:22 AM 2 rev

In order solve our previous issue we have upgraded our SBO system to 9.3 PL13.

I am using an ajax call to log in to the B1 Service Layer in my WEB IDE code -

	var serviceLayerLoginURL = "https://XXX.XXX/b1s/v1/Login";
	//	var that = this;
	$.ajax({
		url: serviceLayerLoginURL,
		xhrFields: {
			withCredentials: true
		},
		data: jData,
		dataType: "json",
		type: "POST",
		success: function (result, xhr) {
			message.success("Connected with SAP system");
			//	that._createUDFs();
		},
		error: function (oError) {
			message.error("Error: " + oError.responseJSON.error.message.value);
		}
	})

We are getting below error CORS policy error -

Our set up was working fine with older version 9.3 PL 07 , so we keep the similar service layer config file its like below -

Is there any change we need to do with version 9.3 PL13 ?

ANKIT CHAUHAN can you please help with this.

Thanks,
Prakash

Attachments

cors.jpg (93.5 kB)
config.jpg (111.2 kB)