This topic contains 4 replies, has 2 voices, and was last updated by
- January 13, 2021 at 1:14 am #31105
Is it possible to use an alternative ajax url instead of
backend_ajaxurlfor ASP is
/wp-admin/admin-ajax.php. Can I change that? It is fine for our development environments, but when we deploy to our QA and PROD environments which are on www domains we block any access or requests to
/wp-admin/for security reasons. Is there a php hook, snippet, or anything I can do with ASP to change the
backend_ajaxurl? Or point me to some docs for some help? I’ve been looking into some ways to do, but I wanted to reach our to you first. Thanks.January 13, 2021 at 3:08 pm #31120Keymaster
I would not recommend doing that whatsoever, as the ajax URL is a wordpress core feature – all the plugins, as well as the wordpress core is using that. Unfortunately I don’t know if that is possible to change securely, I would not recommend moving that file though, or blocking public access from it. You could maybe try blokcing the rest of the folder, and make an exception to it somehow.Best,
If you like my products, don't forget to rate them on codecanyon :)
January 14, 2021 at 1:59 am #31127
Thanks for that info. Is it at least possible to create a WordPress hook to change the value of
"admin_url" => admin_url(),or make it relative so it doesn’t use an absolute URL?January 14, 2021 at 11:59 am #31131KeymasterJanuary 14, 2021 at 6:15 pm #31145
I fixed the issue we were having. It was a CORS Policy cross domain issue. No need to try to hack something together. Everything is working correctly now. Thanks for your info.
You must be logged in to reply to this topic.