Wp-admin issue after Reverse proxy
Question
I’m using a Reverse proxy example.com/blog to point to blog.example.com
Everything works, except forms in the Admin panel. WordPress code is:
<input type="hidden" name="_wp_http_referer" value="/wp-admin/edit.php?post_type=page">
which sends the form to the wrong URL:
example.com/wp-admin/edit.php?post_type=page
while it needs to go to:
example.com/blog/wp-admin/edit.php?post_type=page
I guess the URL is determined by this piece of code (https://developer.wordpress.org/reference/functions/wp_admin_canonical_url/)
$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']
Any idea how to fix this without hacking into the core files?
0
2 years
2021-03-25T19:13:53-05:00
2021-03-25T19:13:53-05:00 0 Answers
0 views
0
Leave an answer