<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cross-Domain requests when using RESTful API in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64575#M12983</link>
    <description>&lt;P&gt;my web service is not posting data. I was trying to post err log data directly from the client's browser (e.g. javascript/flash/silverlight) to a splunk installation which is not on the same server as the web server.&lt;BR /&gt;
But I do agree it's a bad idea, especially because username/pass is in clear text for the rest api.&lt;/P&gt;

&lt;P&gt;I've solved my problem with a custom web page on my web server that receives log data on post parameters, and logs it to splunk using the REST api.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2011 12:25:53 GMT</pubDate>
    <dc:creator>liviu_trifoi</dc:creator>
    <dc:date>2011-08-26T12:25:53Z</dc:date>
    <item>
      <title>Cross-Domain requests when using RESTful API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64573#M12981</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;

&lt;P&gt;I want to push error logs from a silverlight app to our splunk installation.&lt;BR /&gt;
I'm using the splunk RESTful API and it works quite nicely (for non-web clients)&lt;/P&gt;

&lt;P&gt;So I have a site: &lt;A href="http://www.xxx.com"&gt;www.xxx.com&lt;/A&gt;. (Server 1)&lt;BR /&gt;
And a splunk installation at: (Server 2).&lt;/P&gt;

&lt;P&gt;Problem is I can't make web requests from &lt;A href="http://www.xxx.com"&gt;www.xxx.com&lt;/A&gt; to Server 2, because of the same origin policy (See &lt;A href="http://en.wikipedia.org/wiki/Same_origin_policy"&gt;http://en.wikipedia.org/wiki/Same_origin_policy&lt;/A&gt;).&lt;/P&gt;

&lt;P&gt;Silverlight allows such web requests if Server 2 has a clientaccesspolicy.xml or crossdomain.xml at the root of the request.&lt;/P&gt;

&lt;P&gt;So the first thing silverlight does when I request &lt;A href="https://server2:8089/services/receivers/simple"&gt;https://server2:8089/services/receivers/simple&lt;/A&gt;&lt;BR /&gt;
is request a clientaccesspolicy.xml from &lt;A href="https://splunk_server2:8089/clientaccesspolicy.xml"&gt;https://splunk_server2:8089/clientaccesspolicy.xml&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;My question is: How can I make splunk return me an xml written by me when I call the &lt;A href="https://splunk_server2:8089/clientaccesspolicy.xml"&gt;https://splunk_server2:8089/clientaccesspolicy.xml&lt;/A&gt; url.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2011 15:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64573#M12981</guid>
      <dc:creator>liviu_trifoi</dc:creator>
      <dc:date>2011-08-25T15:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cross-Domain requests when using RESTful API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64574#M12982</link>
      <description>&lt;P&gt;You won't be able to get splunkd to return a client access policy.  I would recommend against using cross-domain requests.  In fact, I don't see why a cross domain request is required at all for your web service to post to Splunk's REST API, but I might be misunderstanding your question.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2011 20:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64574#M12982</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-25T20:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cross-Domain requests when using RESTful API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64575#M12983</link>
      <description>&lt;P&gt;my web service is not posting data. I was trying to post err log data directly from the client's browser (e.g. javascript/flash/silverlight) to a splunk installation which is not on the same server as the web server.&lt;BR /&gt;
But I do agree it's a bad idea, especially because username/pass is in clear text for the rest api.&lt;/P&gt;

&lt;P&gt;I've solved my problem with a custom web page on my web server that receives log data on post parameters, and logs it to splunk using the REST api.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2011 12:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64575#M12983</guid>
      <dc:creator>liviu_trifoi</dc:creator>
      <dc:date>2011-08-26T12:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cross-Domain requests when using RESTful API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64576#M12984</link>
      <description>&lt;P&gt;That is the approach I would recommend, to build a proxy on the server rather than doing cross-domain requests.  Well done!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2011 18:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cross-Domain-requests-when-using-RESTful-API/m-p/64576#M12984</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-26T18:47:09Z</dc:date>
    </item>
  </channel>
</rss>

