Support » Networking WordPress » I have error 403 wp-json in other domain when post new (subdomain is ok)

  • Resolved Dan

    (@cmdntd)


    I set up multisite with these:
    OPEN LITESPEED SERVER + CLOUDFLARE + SSL LET’S ENCRYPT

    Everything is ok with main site and subdomain site
    Health check: ok almost

    But when I run it for other domain, when go to new post page it has error (console):
    It seems error REST API or SSL through Cloudflare

    I tried to disable all plugins and other themes
    Could you give me any idea, please?

    Error Image:
    https://www.awesomescreenshot.com/image/16985349?key=ec71d55c5ea8b32385f7a93533e474a9

    load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.2:5 JQMIGRATE: Migrate is installed, version 3.3.2
    /wp-json/extendify-sdk/v1/user:1 Failed to load resource: the server responded with a status of 403 ()
    extendify-sdk.js?ver=11.7:2 Object
    (anonymous) @ extendify-sdk.js?ver=11.7:2
    deprecated.min.js?ver=932d8bb37da8bbb396a7a3f754345e08:2 Using custom components as toolbar controls is deprecated since version 5.6. Please use ToolbarItem, ToolbarButton or ToolbarDropdownMenu components instead. See: https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols
    i @ deprecated.min.js?ver=932d8bb37da8bbb396a7a3f754345e08:2
    /wp-json/extendify-sdk/v1/site-settings:1 Failed to load resource: the server responded with a status of 403 ()
    extendify-sdk.js?ver=11.7:2 Object
    (anonymous) @ extendify-sdk.js?ver=11.7:2
    blocks.min.js?ver=7ed7fe32dad771c4e0af4f56539ff156:2 Block successfully updated for <code>core/button</code> (Object).
    me:1 Failed to load resource: the server responded with a status of 403 ()
    phuonghuynh.org/:1 Failed to load resource: the server responded with a status of 403 ()
    me:1 Failed to load resource: the server responded with a status of 403 ()
    phuonghuynh.org/:1 Failed to load resource: the server responded with a status of 403 ()
    api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2 GET https://phuonghuynh.org/wp-json/wp/v2/users/me?_locale=user 403
    _ @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    f @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    b @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    a @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    b.method.r @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    (anonymous) @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    a @ api-fetch.min.js?ver=134e23b5f88ba06a093f9f92520a98df:2
    
    • This topic was modified 1 week, 4 days ago by Dan.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Do those API requests work correctly when you manually request one from your browser’s address bar? Passing a user name like “me” to the endpoint is normally incorrect. The user’s ID is normally required. Behavior could be modified by plugins, so YMMV. Usually the response to a request by name is 404, not 403, so something else may be at play.

    If the issue is only with cross domain requests, the CSP (content security policy) headers may not allow it. WP doesn’t normally send these, but server configurations could, as could some themes or plugins. Use your browser’s network developer tool to examine response headers.

    Thread Starter Dan

    (@cmdntd)

    I solved it!
    It caused by old cookies. It’s ok when I try to delete all cookies.

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