<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[SOLVED] Ajax CORS Issue]]></title><description><![CDATA[<p dir="auto">I am trying to get <a href="https://github.com/derickson/MMderickson" target="_blank" rel="noopener noreferrer nofollow ugc">this</a> Uber module working. I am currently running it on an amazon ec2 instance by using <code>node serveronly</code>.</p>
<p dir="auto">On the console log page I see the following this error:<br />
<code>Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers in preflight response.</code></p>
<p dir="auto">Call to Uber API. <a href="https://github.com/derickson/MMderickson/blob/master/uber/uber.js#L81" target="_blank" rel="noopener noreferrer nofollow ugc">LINK</a>.</p>
<p dir="auto">I don’t think there is an issue with the way the call is being made. After all the stackoverflow’ing, it seems like it might be related to the way node starts up the server. I am unable to find the the place where the header is being set and I was hoping someone here could point me in the right direction.</p>
<p dir="auto">Solve: Had to add my localhost:8080 to uber developer dashboard for CORS forwarding.</p>
]]></description><link>https://forum.magicmirror.builders/topic/3587/solved-ajax-cors-issue</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 21:50:23 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/3587.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jun 2017 06:19:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] Ajax CORS Issue on Fri, 16 Jun 2017 11:06:57 GMT]]></title><description><![CDATA[<p dir="auto">I had to do this in one of my node_helper modules… Hope it helps:</p>
<p dir="auto">request({<br />
url: url,<br />
method: ‘GET’,<br />
headers: {<br />
‘User-Agent’: ‘MagicMirror/1.0 (’ + this.config.email + ‘)’<br />
}</p>
<p dir="auto">You won’t need the +this.config.email but it was required for the data I was seeking :)</p>
]]></description><link>https://forum.magicmirror.builders/post/23649</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/23649</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Fri, 16 Jun 2017 11:06:57 GMT</pubDate></item></channel></rss>