Установили плагин Algolia для моего сайта, но когда он пытается запустить тест, он всегда терпит неудачу, не имея полезной информации о том, почему. Сообщение об ошибке:wp_remote_post() проверить не удалось с помощью Algolia
Array
(
[headers] => Requests_Utility_CaseInsensitiveDictionary Object
(
[data:protected] => Array
(
[server] => nginx/1.10.0 (Ubuntu)
[date] => Wed, 28 Sep 2016 09:20:36 GMT
[content-type] => text/html; charset=UTF-8
[expires] => Wed, 11 Jan 1984 05:00:00 GMT
[cache-control] => no-cache, must-revalidate, max-age=0
[x-frame-options] => Array
(
[0] => SAMEORIGIN
[1] => DENY
)
[location] => https://www.myhost.co.uk/directory/
[strict-transport-security] => max-age=15768000; includeSubDomains; preload
[x-content-type-options] => nosniff
)
)
[body] =>
[response] => Array
(
[code] => 302
[message] => Found
)
[cookies] => Array
(
)
[filename] =>
[http_response] => WP_HTTP_Requests_Response Object
(
[response:protected] => Requests_Response Object
(
[body] =>
[raw] => HTTP/1.1 302 Found
Server: nginx/1.10.0 (Ubuntu)
Date: Wed, 28 Sep 2016 09:20:36 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: close
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
X-Frame-Options: SAMEORIGIN
Location: https://www.myhost.co.uk/directory/
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
[headers] => Requests_Response_Headers Object
(
[data:protected] => Array
(
[server] => Array
(
[0] => nginx/1.10.0 (Ubuntu)
)
[date] => Array
(
[0] => Wed, 28 Sep 2016 09:20:36 GMT
)
[content-type] => Array
(
[0] => text/html; charset=UTF-8
)
[expires] => Array
(
[0] => Wed, 11 Jan 1984 05:00:00 GMT
)
[cache-control] => Array
(
[0] => no-cache, must-revalidate, max-age=0
)
[x-frame-options] => Array
(
[0] => SAMEORIGIN
[1] => DENY
)
[location] => Array
(
[0] => https://www.myhost.co.uk/directory/
)
[strict-transport-security] => Array
(
[0] => max-age=15768000; includeSubDomains; preload
)
[x-content-type-options] => Array
(
[0] => nosniff
)
)
)
[status_code] => 302
[protocol_version] => 1.1
[success] =>
[redirects] => 0
[url] => https://www.myhost.co.uk/wp-admin/admin-post.php
[history] => Array
(
)
[cookies] => Requests_Cookie_Jar Object
(
[cookies:protected] => Array
(
)
)
)
[filename:protected] =>
[data] =>
[headers] =>
[status] =>
)
)
Я не могу работать из этого, где проблема есть - 302 код выглядит нормально, но я не уверен, что происходит, что вызывает сценарий на неудачу.
Если я загружаю URL-адрес в браузере или используя Postman, я получаю код состояния 200. Curl включен и работает на моем сервере, поэтому я не уверен, в чем проблема.
Любая помощь оценена!
Привет, Похоже, что при запуске URL-адреса с вашего сервера он пытается перенаправить его. У вас есть HTTPS + HTTP? – rayrutjes
Он пытается перенаправить на https://www.myhost.co.uk/directory/? Это звонит? – rayrutjes
@rayrutjes У меня есть HTTPS и HTTP, но HTTP просто перенаправляет прямо на HTTPS и уровень конфигурации Nginx. У меня установлен каталог, который является одной из вещей, которые я пытаюсь индексировать с помощью Algolia. Не уверен, какие другие тесты я могу попытаться воспроизвести! –