Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartClient can't directly contact URL ... due to browser same-origin policy.

    Hi all,

    I got this message "SmartClient can't directly contact URL .....due to browser same-origin policy."
    My host page is http://192.168.1.5/asterisk/userportal.html.
    To fill the ListGrid the datasource sends a request (RESTDataSource) to "perl back-end" and I see in Firebug that the URL is http://192.168.1.5/asterisk/JSONService.cgi?service=feature&parentId=null&_operationType=fetch&_operationId=isc_OID_8_fetch&_textMatchStyle=exact&_componentId=isc_OID_15&_dataSource=isc_OID_8
    By comparing these two URLs i see that as the protocol (http) as the host (192.168.1.5) as the port (default), they all are the same and there is no any reason for SOP problem.

    Can anyone could give me a hint what this all mean?
    Any comments?

    #2
    Just found out that if I remove the prefix (I used the GWT.getModuleBaseURL() as a prefix) part from the fetchDataURL and it becomes "relative" then there is no SOP problem

    Comment


      #3
      I also get the same error, when connecting to a server which sets the header
      Access-Control-Allow-Origin *

      More details from GWT project:
      [ERROR] XRP7:WARN:RPCManager:Error performing rpcRequest: error: TRANSPORT_ERROR, response: {status: -90, data: Obj, httpResponseCode: 0, transactionNum: 0, clientContext: undef, context: Obj, startRow: 0, endRow: 0, totalRows: 0}

      Is this supported by SmartGWT data sources?

      Comment

      Working...
      X