• Tim Morgan 46
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am trying to send $http request to salesforce for submitting a ticket.
I enabled in security setting cors while adding my site to the withlist.
The probelm is that i am still getting the famous error:
XMLHttpRequest cannot load https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mystie.com' is therefore not allowed access.

Code:
$http({
                method: 'POST',
                url: 'https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8',
                headers: { 'Content-Type': 'application/json' },
                data: param2
            }).
Thanks in advance for your help.
Dan