Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
CORS error when try to edit custom feed
Post Flair (click to view more posts with a particular flair)
Post Body

Hi,

Two years ago I created a webpage to provide a UI to edit custom feeds, it uses oauth2 authentication flow and calls https://www.reddit.com/dev/api#PUT_api_multi_{multipath} API. Back then it worked without a problem.

Recently a GitHub issue was created that says the webpage is not working anymore: when you try to edit your custom feed it returns a CORS error:

... has been blocked by CORS policy: Method PUT is not allowed by Access-Control-Allow-Methods in preflight response.

n was searching for a solution in other GitHub projects I found none. However, I found projects that also have the very same problem of not being able to edit custom feeds due to CORS (and probably they were tested back when the feature was added):

in my project the following code causes the error:

public async updateMulti(
  multiPath: string,
  subreddits: { name: string }[],
  accessToken: string
 ): Promise<void> {
  const axiosInstance = axios.create({
    baseURL: "https://oauth.reddit.com",
    timeout: 5000,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
      Authorization: "bearer "   accessToken,
    },
  });
  return axiosInstance.put(
    `/api/multi${multiPath}`,
    {},
    {
      params: {
        model: {
          subreddits: subreddits,
        },
      },
    }
  );
}

Could you please tell me what has changed on the Reddit API side in the last 2 years that my webpage should be updated according to?

Author
Account Strength
80%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
2
Link Karma
2
Comment Karma
n/a
Profile updated: 3 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago