jquery. Refused to set unsafe header "User-Agent" on REST data source

  • 1
  • Problem
  • Updated 3 years ago
  • In Progress
  • (Edited)
I created a Skuid Platform to explore what can be done.

1.  I created a new data source that was REST data type.
According to the github API docs, it is required to set these  default headers
  • Accept: application/vnd.github.v3+json
  • User-Agent: joseph-ortiz
2. I created a blank page and added a model with the the newly created data source. 
3. I then previewed the page and noticed in the console that there was error that reads:

"Refused to set unsafe header "User-Agent"

I figure I can create another API that wraps around the github endpoint but wanted to see if you ran into this issue.

the actual call i'm trying to make is

GET /users?since=135 HTTP/1.1Host: api.github.com
User-Agent: joseph-ortiz
Accept: application/vnd.github.v3+json

Photo of Joseph Ortiz

Joseph Ortiz

  • 594 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 12,352 Points 10k badge 2x thumb
Hi Joseph, are you attempting to connect to Salesforce as an external data source? If so, this known Salesforce issue may be coming into play: