SAME ORIGIN POLICY and CORS in spoiling my integration project in quickbase

  • 0
  • 2
  • Question
  • Updated 3 years ago
  • Answered

Hi Dandiebolt Pirate

   I have done a project in Quickbase where i interface through JQuery and Ajax with another server (SAP) through a middleware (SAP PI). I used google chrome as i my development tool since , i knew how to disable security (--disable web security) and succesfully did a test. I never realized my real struggle would begin when i wish to go live. Since i cannot use the flag (--disable web security) in live situation and futher i want the flexibility of using any browser, I don't know how to make my ajax / jquery call CORS enabled to solve this issue.

The SAP PI server is our local server and i can ask its adminstrator to influence its "crosspolicy.xml" file to allow reqeusts from apollotyres.quickbase.domain.

I need a sample code, which can help me to make my request solve CORS issue.

Here's my code

-----

jQuery.ajax({type: "POST",

url: 'http://x.com/XISOAPAdapter/MessageServlet

        contentType: "text/xml",

dataType: "xml",

        data : soapMessage,

enableLogging: true,

headers: 

{

'Authorization': 'Basic ' + btoa('user:passsword')

},

success: function (response) 

{

alert ("success");

                console.log(response);

},


   


error: function (response) 

{

alert ("error");

                console.log(response);

}

------


Would appreciate any help.


best regards

dinesh

Photo of Dinesh

Dinesh

  • 202 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 2
Photo of Dave

Dave

  • 0 Points
Hi Dinesh,

We built an AngularJS SPA using the QuickBase HTTP API to work with the CORS issue.

https://www.quickbase.com/api-guide/index.html


Dave
Photo of Jim

Jim

  • 62 Points
I was just typing this, you beat me to it. :)
Photo of David

David

  • 20 Points
Hi Dave,

This really does not answer his question. He needs to know, as do I,  how do you solve the same origin policy? Not how to create and modify API queries. I really wish you had shared your working code instead of pointing us at a wall. If you have the answers how about answering these:

How do you activate CORS with jQuery and AJAX using the QB API?

Why does QuickBase not support json return?

Where do you allow your QB apps to allow other origins access through CORS?

If you have a working Angular app that utilizes the HTTP API...

PLEASE share a sample of your API request code that is live and working properly as he requested.

A general link to the main API reference home page helps no one.