question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow header field `Cache-Control` in preflight requests

See original GitHub issue

Hopefully I can just code around this. However, I’m running into an issue with the Access-Control-Allow-Headers not including Cache-Control:

Failed to load https://mybinder.org/build/gh/nteract/vdom/master: Request header field Cache-Control is not allowed by Access-Control-Allow-Headers in preflight response

Full request structure (from Chrome dev tools):

:authority:mybinder.org
:method:OPTIONS
:path:/build/gh/nteract/vdom/master
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, br
accept-language:en-US,en;q=0.9
access-control-request-headers:cache-control
access-control-request-method:GET
cache-control:no-cache
origin:http://127.0.0.1:3000
pragma:no-cache
referer:http://127.0.0.1:3000/
user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Miniland1333commented, Aug 19, 2018

I’ve removed the requestKernel: true, which means that binder instances are now manually requested only. I might integrate thebelab into my analytics to gauge how popular it is.

Thebelab itself does not use serviceworkers but the site as a whole does. I’m glad we could deal with the issue binderhub-side since the serviceworkers are bundled as part of the PaaS.

1reaction
Miniland1333commented, Aug 19, 2018

I’m using @minrk 's Thebelab project to embed into an HTML webpage. I knew of Thebe but didn’t know Thebelab had resurrected the project. I wish Thebelab had higher visibility since it is perfect for external websites to communicate with Binderhub!

An example of Thebelab that I’m working on is Chuck Serverance’s e-textbook. (You many need to refresh the page once due to the above issue)

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request header field Access-Control-Allow-Headers is not ...
When you start playing around with custom request headers you will get a CORS preflight. This is a request that uses the HTTP...
Read more >
Access-Control-Allow-Headers - HTTP - MDN Web Docs
The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers ...
Read more >
Request header field cache-control is not allowed by Access ...
Hi, I'm using an Ajax call as: var settings = { "async": true, "crossDomain": true, ...
Read more >
Understanding response headers policies - Amazon CloudFront
Specifies the HTTP methods that CloudFront uses as values for the Access-Control-Allow-Methods header in responses to CORS preflight requests. Valid values are ...
Read more >
Cache your CORS, for performance & profit | HTTP Toolkit
This preflight request is an OPTIONS request to the server, ... The server has to respond with headers that confirm it's happy to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found