TwitchTV CORS Error

Hi Everyone,

After solving all other CORS issues and getting my code to work in my browser (not in CodePen), running it in CodePen gives me this error:

Access to Font at ‘’ from origin ‘’ has been blocked by CORS policy: The ‘Access-Control-Allow-Origin’ header has a value ‘’ that is not equal to the supplied origin. Origin ‘’ is therefore not allowed access.

I’ve been trying to debug this issue for hours and have poured over the FCC and StackOverflow forums with no success. I’d appreciate any help on this.

Again, it works perfectly when I’m just running it in the browser via my text editor:

But when I run it in CodePen, this error shows up. I’ve tried adding in headers that account for Access-Control-Allow-Origin and origin:, but nothing has worked.

The project can be found here:
And my JS below:

$(document).ready(() => {
    const users = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

    const renderLink = (userData) => {
        const streamer = userData._links.self.split('streams/')[1];
        const newStream = $("<td>");
        const newLink = $("<a>");
        $(newLink).attr('href', `${streamer}`);
        $(newLink).attr('target', '_blank');

        return newStream;

    const renderData = (userData) => {
        if ( === null) {
            const newRow = $("<tr>");
            const newStream = renderLink(userData);

            const newStatus = $("<td>");

        else {
            const newRow = $("<tr>");
            const newStream = renderLink(userData);

            const newStatus = $("<td>");

            const newTitle = $("<td>");

            const newDesc = $("<td>");


    const getUsers = arr => {, i) => {
            $.getJSON(`${user}?callback=?`, userData => {


Yeah, I’ve been noticing that error a lot too. It seems to be an issue with codepen trying to load fonts. It appears to be an internal problem, behind the scenes. For example, if I start a completely empty project and open the console, the same errors pop-up, so it has nothing to do with your project, it’s a codepen problem.

1 Like

Yea that makes sense, it just randomly popped up all of a sudden even though the code was working fine before. Thanks for the clarification!