<p>So this is the result of change in the behaviour of <code>rack-cors</code> but that change is deliberate and is probably a good thing.</p>
<p>The previous behaviour was to default to sending <code>Access-Control-Allow-Credentials: true</code> which allows the client to send credentials with a CORS request and to also reflect the domain, which is required when allowing credentials as a wildcard domain is not valid in that case.</p>
<p>Now it won't allow you to set a wildcard domain and allow credentials and the default is only to allow credentials if the domains are restricted.</p>
<p>There is a way to go back to the old behaviour, but that behaviour is a potential security issue - we are allowing all domains because our data is generally public but not everything is and if we allow credentials then a malicious site could silently fetch (for example) your user details in the background if the browser knew your authentication details.</p>
<p>Note that this doesn't affect OAuth as the browser won't silently sign requests in the way it will silently pass on basic authentication and/or cookies.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1609#issuecomment-321654658">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLfnv7CcwEKkFFRyZLD3YVazO7_9_ks5sW153gaJpZM4Ov1wt">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLTbJnbDCsHDVPVHMSCvvofAhcc0jks5sW153gaJpZM4Ov1wt.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/1609#issuecomment-321654658"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@tomhughes in #1609: So this is the result of change in the behaviour of `rack-cors` but that change is deliberate and is probably a good thing.\r\n\r\nThe previous behaviour was to default to sending `Access-Control-Allow-Credentials: true` which allows the client to send credentials with a CORS request and to also reflect the domain, which is required when allowing credentials as a wildcard domain is not valid in that case.\r\n\r\nNow it won't allow you to set a wildcard domain and allow credentials and the default is only to allow credentials if the domains are restricted.\r\n\r\nThere is a way to go back to the old behaviour, but that behaviour is a potential security issue - we are allowing all domains because our data is generally public but not everything is and if we allow credentials then a malicious site could silently fetch (for example) your user details in the background if the browser knew your authentication details.\r\n\r\nNote that this doesn't affect OAuth as the browser won't silently sign requests in the way it will silently pass on basic authentication and/or cookies."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/1609#issuecomment-321654658"}}}</script>