proxy_set_header Hodst $ host необходим для URL админ панели, но портит другие URL WordPress

<html>
  <script>
    var xmlDoc = null ;

  function load() {
    if (typeof window.ActiveXObject != 'undefined' ) {
      xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
      xmlDoc.onreadystatechange = process ;
    }
    else {
      xmlDoc = new XMLHttpRequest();
      xmlDoc.onload = process ;
    }
    xmlDoc.open( "GET", "background.html", true );
    xmlDoc.send( null );
  }

  function process() {
    if ( xmlDoc.readyState != 4 ) return ;
    document.getElementById("output").value = xmlDoc.responseText ;
  }

  function empty() {
    document.getElementById("output").value = '<empty>' ;
  }
</script>

<body>
  <textarea id="output" cols='70' rows='40'><empty></textarea>
  <br></br>
  <button onclick="load()">Load</button> &nbsp;
  <button onclick="empty()">Clear</button>
</body>
</html>
0
задан Anders Orset 15 January 2019 в 19:26
поделиться

1 ответ

Обнаружили, что проблема была в приложении Wordpress, а не в конфигурации Nginx. Оказывается, в Wordpress есть нечто, называемое wp_admin_canonical_url (), которое устанавливает URL в дополнение к siteurl и home.

См. https://wordpress.stackexchange.com/questions/269798/wrong-wp-admin-url .

0
ответ дан Anders Orset 15 January 2019 в 19:26
поделиться
Другие вопросы по тегам:

Похожие вопросы: