Skip to content

dont work on vercel production #6

@swarajbachu

Description

@swarajbachu

here is my code, works locally but gives 403 error in production

export const getMarkdownFromArticle = async (url: string) => {
  console.log(url, "url");
  try {
    const res = await axios.get(`https://md.dhr.wtf/?url=${url}`, {
      headers: {
        "Content-Type": "application/json",
      },
    });
    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
    return res.data[0].md as string;
  } catch (e) {
    // console.error(e.message);
    throw new Error("Failed to fetch markdown from article");
  }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions