H
H
HelpSophie2021-09-25 00:52:57
GitHub
HelpSophie, 2021-09-25 00:52:57

Is there any way to use a file from Github Gist in codepen type sandboxes?

Subject.
Tried to pick up as an external resource, but writes that CORS and all that.
Am I doing something wrong or is this not possible? Maybe some alternatives, except for your own hosting (everything is clear with it)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GrayHorse, 2021-09-25
@GrayHorse

writes that CORS

Maybe some alternatives

GitHub Pages
https://pages.github.com/
---
UPD.
Okay, if you want only GG, I answer directly the question "Is there any way to use a file from Github Gist in sandboxes like codepen?".
There is a way. Namely, use an extension that will weaken CORS by adding appropriate headers for requests to GG.
Like this: https://chrome.google.com/webstore/detail/modheade... (Specifically, you can’t select a specific origin for which you want to modify the headers, it works for all requests at once).
Or the classic of the genre for bypassing CORS is to use a proxy server.
UPD 2.
If we are talking about a JS file:
pick up as an external resource, but writes that CORS and all that.

Not CORS, but CORB. Since GG gives files with content-type: text/plain; charset=utf-8.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question