• Looking at my browser console and the rest.php file the /update_options endpoint is called by JS as GET but in the code is specified as POST so I can’t save the options and I think that the error is there also for other endpoints.

    I can’t read the JS code as it is obfuscated to see where is the error.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    It’s a actually a POST in JS too (otherwise so many users would run into an issue currently). Do you really see a GET in the Network Tab of the DevTools?

    Yes as you can see in my screen https://imgur.com/a/drGRj4V

    I patched the php code to be a GET call, I have the issue with different browsers.

    Plugin Author Jordy Meow

    (@tigroumeow)

    What I see on your screenshot is different ??

    The JS itself attempts a POST. But the server rejects it, and redirects it to a GET. And the GET fails! ?? I feel like you might have another plugin, or another option somewhere on your hosting that does this. In fact, 2-3y ago, another user has exactly the same issue, with POST redirected to GET, and I think it was a security plugin, but I am not sure now.

    You are right there is a redirect somehow.

    I am checking my installation.

    I found the issue.

    Basically I do a reiredirect if a url doesn’t end with a slash and all your Rest requests doens’t do that so they get a redirect to the version with the ending /.

    I am patching the index.js for the various endpoints right now.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    It’s typical for APIs to end without a trailing slash (https://platform.openai.com/docs/api-reference/chat, for example), and in Media Cleaner, both on client-side and server-site, it’s called/registered without this slash. So it should work ??

    This is a hack for an issue only you have, on your install. There are 80,000 users of this plugin, and it seems you are the only one with this issue. So I think it would be better to look into this issue. Might be rules set on the server, Cloudflare, but it could be anything else. The URL would not exist, it would be a 404, it would not be redirected to the same URL without a slash and a different method, that is extremely tricky. I wouldn’t feel confident if my websites were doing this ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.