Ilogeek / redmine_issue_dynamic_edit

Allows users to dynamically update (AJAX) issue's attributes from issue details page without any refresh (JIRA like)
http://www.redmine.org/plugins/redmine_issue_dynamic_edit
MIT License
134 stars 56 forks source link

HTTPS request getting a Mixed Content error. #48

Closed federicocandiago closed 4 years ago

federicocandiago commented 5 years ago

Hello,

I'm using Redmine 3.4 with jQuery 1.11.1 on a Bitnami instance, Windows Server 2019. I installed the plugin and set the _CONF_FORCE_HTTPS = true parameter on the configuration file, but accessing by https I still receive the error:

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: [...]

I tried to print the LOCATION_HREF variable (it contains the correct https URL) and tweak the $.ajax calls like this:

        type: 'POST',
        url: 'https://' + (
            typeof custom_location_href !== 'undefined' 
            ? custom_location_href.split('://')[1]  
            : window.location.href.split('://')[1] 
        ) + '/',
        data: formData,

But I still receive the same error, it's like the ajax calls are somehow being edited from https to http. Could anyone help me and indicate how to fix this issue?

edit:

it appears that while the $.ajax() url is given correctly, the issue is caused by the response headers to the POST request, but i'm still unable to solve the issue:

Location | http://website…sue_id=4204&prev_issue_id=5667

Thanks in advance.

Ilogeek commented 4 years ago

Hello @federicocandiago

Thank you for your message. Unfortunately this kind of issue is probably a misconfiguration of the server and the http to https redirection. Have you tried to edit the _CONF_FORCE_HTTPS variable ? https://github.com/Ilogeek/redmine_issue_dynamic_edit/blob/657015d97f76a1833f1133d573a5142e82782bf5/assets/javascripts/issue_dynamic_edit_configuration_file.js#L12 You can also check this issue https://github.com/Ilogeek/redmine_issue_dynamic_edit/issues/35