Я использую Redmine 3.4 с jQuery 1.11.1 на экземпляре Bitnami, Windows Server 2019. Он настроен для работы на порту 443 в соответствии с этим руководством, поэтому я принудительно перенаправил все http-соединения о, https. Затем я установил этот плагин , который выполняет серию вызовов $ .ajax ().
Хотя URL-адрес запроса передается в виде запроса https, в заголовке ответа указывается http-местоположение, что приводит к ошибке:
Mixed Content: The page at 'https://../issues/7501?issue_count=11&issue_position=1&next_issue_id=6028' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://../issues/7501?issue_count=11&issue_position=1&next_issue_id=6028'. This request has been blocked; the content must be served over HTTPS. -------- Error while updating the issue attribute dynamically -------- issue_dynamic_edit.js?1562175326:389 xhr data: ...
Я отредактировал запросы Ajax так:
type: 'POST',
url: 'https://' + (
typeof custom_location_href !== 'undefined'
? custom_location_href.split('://')[1]
: window.location.href.split('://')[1]
) + '/',
data: formData
Заголовки ответа на запрос POST выглядят так:
Location | http://website…sue_id=4204&prev_issue_id=5667
И приложения \ redmine \ comnf \ httpd-vhosts.conf выглядят так:
<VirtualHost *:80>
ServerName websiteurl.com
ServerAlias www.websiteurl.com
Redirect permanent / https://websiteurl.com
</VirtualHost>
<VirtualHost *:443>
ServerName websiteurl.com
ServerAlias www.websiteurl.com
DocumentRoot "C:/Bitnami/redmine-3.4.6-5/apps/redmine/htdocs/public"
SSLEngine on
SSLCertificateFile "C:/Bitnami/redmine-3.4.6-5/apps/redmine/conf/certs/name.wildcard.crt"
SSLCertificateChainFile "C:/Bitnami/redmine-3.4.6-5/apps/redmine/conf/certs/gd_bundle-g2-g1.crt"
SSLCertificateKeyFile "C:/Bitnami/redmine-3.4.6-5/apps/redmine/conf/certs/name.wildcard.key"
RequestHeader set X_FORWARDED_PROTO 'https'
<Directory "C:/Bitnami/redmine-3.4.6-5/apps/redmine/htdocs/public">
Options -MultiViews
allow from all
</Directory>
RewriteEngine On
RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
<Proxy balancer://redminecluster>
BalancerMember http://127.0.0.1:3001
BalancerMember http://127.0.0.1:3002
</Proxy>
Include "C:/Bitnami/redmine-3.4.6-5/apps/redmine/conf/httpd-app.conf"
</VirtualHost>
Что может быть причиной? Могут ли тонкие серверы способствовать возникновению проблемы? я попытался, установив файл .htaccess в общую папку, но это не помогло.
.htaccess:
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Заранее спасибо, любая помощь будет принята с благодарностью.