Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got a bunch of error when using disquss with Nextjs also got a CORS #127

Open
rahXephonz opened this issue Apr 27, 2022 · 3 comments
Open

Comments

@rahXephonz
Copy link

rahXephonz commented Apr 27, 2022

Describe the bug

Got a bunch of error when using disquss with especially it was blocked by CORS. please see the image

Screenshots

image

Specifications:

  • OS: Windows 10
  • Package version: v.1.1.2
  • Node version: v14.18.1

Additional context

import React from "react";
import styled from "@emotion/styled";
import { DiscussionEmbed } from "disqus-react";

type BlogCommentsProps = {
  title: string;
  slug: string;
};

type DisqusConfig = {
  url: string;
  identifier: string;
  title: string;
};

const CommentsWrapper = styled.div`
  max-width: 100%;
  margin: 40px 0px;

  @media screen and (max-width: 653px) {
    padding: 0 15px;
  }
`;

const BlogComments: React.FC<BlogCommentsProps> = (props) => {
  // your disquss shortname from https://disqus.com/admin/
  const disqusShortname = process.env.NEXT_PUBLIC_DISQUS_SHORTNAME;

  const disqusConfig = {
    // your site that was deployed on server in here
    url: `https://rizkyy.space/blog/${props.slug}`,
    identifier: props.title,
    title: props.title,
  };

  return (
    <CommentsWrapper>
      <DiscussionEmbed
        shortname={disqusShortname}
        config={disqusConfig as DisqusConfig}
      />
    </CommentsWrapper>
  );
};

export default BlogComments;

Any solutions about this?

@tterb
Copy link
Contributor

tterb commented May 2, 2022

@ioofy These console errors appear to be caused by failing request for the sponsored links that Disqus utilizes for ad-supported publishers. My best guess is that they are likely failing due of some kind of adblock extension.

@rahXephonz
Copy link
Author

@ioofy These console errors appear to be caused by failing request for the sponsored links that Disqus utilizes for ad-supported publishers. My best guess is that they are likely failing due of some kind of adblock extension.

oh i see, ok thanks for replying.

@Andresdamelio
Copy link

Andresdamelio commented Jun 23, 2022

@ioofy These console errors appear to be caused by failing request for the sponsored links that Disqus utilizes for ad-supported publishers. My best guess is that they are likely failing due of some kind of adblock extension.

@tterb I have the same problem, but I don't have any active extension, testing from the phone I get the same thing. And it only happens in chrome, in safari it loads correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants