<?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 BUG: In 3.0 No Cookie Present in Proxy Requests in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453370#M41906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Took me a few to figure this out.&amp;nbsp; Any requests sent through ArcGIS for JavaScript 3.0 using a proxy url does not include the cookie.&amp;nbsp; This is pretty severe since a secure cookie determines whether the request is authenticated against a server.&amp;nbsp; When my server receives it, it kicks it out because the request was not authenticated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In version 2.8 and prior versions, the cookie is sent correctly.&amp;nbsp; Switch to 3.0, no cookie.&amp;nbsp; Therefore any site using forms authentication (with or without SSL) and a proxy will see this bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround is simply to stick with 2.8 until it can be fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have screenshots if needed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2012 11:27:08 GMT</pubDate>
    <dc:creator>DerivenC</dc:creator>
    <dc:date>2012-07-02T11:27:08Z</dc:date>
    <item>
      <title>BUG: In 3.0 No Cookie Present in Proxy Requests</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453370#M41906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Took me a few to figure this out.&amp;nbsp; Any requests sent through ArcGIS for JavaScript 3.0 using a proxy url does not include the cookie.&amp;nbsp; This is pretty severe since a secure cookie determines whether the request is authenticated against a server.&amp;nbsp; When my server receives it, it kicks it out because the request was not authenticated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In version 2.8 and prior versions, the cookie is sent correctly.&amp;nbsp; Switch to 3.0, no cookie.&amp;nbsp; Therefore any site using forms authentication (with or without SSL) and a proxy will see this bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround is simply to stick with 2.8 until it can be fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have screenshots if needed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 11:27:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453370#M41906</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2012-07-02T11:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: In 3.0 No Cookie Present in Proxy Requests</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453371#M41907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be isolated to my circumstance but I doubt it.&amp;nbsp; I used to override esri._getProxyUrl such that I could replace the url with a variation to my domain name (e.g. www1.mydomain.com, www2.mydomain.com, etc.)&amp;nbsp; Once I disabled this override (by commenting it out), I was good-to-go .. but now only using &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/www.mydomain.com"&gt;www.mydomain.com&lt;/A&gt;&lt;SPAN&gt; for the proxy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore I tried to change the url using the new(?) esri.setRequestPreCallback option.&amp;nbsp; If I do nothing in the callback, it works fine (but again only using the &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/www.mydomain.com"&gt;www.mydomain.com&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; If I update the url to use my subdomain variants, the request goes out but without any cookie information.&amp;nbsp; I'm guessing this has something to do with the new CORS functionality.&amp;nbsp; In 2.8, using subdomains was never a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll keep looking into this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 13:52:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453371#M41907</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2012-07-02T13:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: In 3.0 No Cookie Present in Proxy Requests</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453372#M41908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I tried opening my map using Opera 11 which doesn't support CORS according to caniuse.com and I still get the error.&amp;nbsp; So CORS is not the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It could be dojo 1.7.&amp;nbsp; Because this is happening at the xHR level.&amp;nbsp; The deal is my secure cookie is for a 2nd-level domain (.mydomain.com) and should be included in any requests for that domain.&amp;nbsp; In fact, if I copy/paste the failing url into the address bar, it works fine.&amp;nbsp; But in ArcGIS for JS, I get a 500 error -- which my web site throws if the request isn't authenticated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using multiple domains is a common practice to increase performance, as even indicated by &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2009/12/10/using-multiple-subdomains-with-a-tiled-service-layer/"&gt;ESRI&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; As long as the secure cookie is 2nd-level, it should be passed along with all subdomain requests. (&lt;/SPAN&gt;&lt;A href="http://tools.ietf.org/html/rfc2965#section-1"&gt;source&lt;/A&gt;&lt;SPAN&gt;)&amp;nbsp; So I'm not doing anything out of the ordinary.&amp;nbsp; Our entire site wouldn't work otherwise.&amp;nbsp; It has worked for over two years with multiple subdomains, from Silverlight to JS implementations.&amp;nbsp; Now the proxy won't work unless I restrict it to one domain, which is annoying.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a suggestion, can we give esri.config.defaults.io.proxyUrl an array of strings?&amp;nbsp; Then ArcGIS for JS can randomly pick a proxy URL and handle it accordingly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 10:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bug-in-3-0-no-cookie-present-in-proxy-requests/m-p/453372#M41908</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2012-07-03T10:31:52Z</dc:date>
    </item>
  </channel>
</rss>

