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
137 stars 55 forks source link

Mixed content - requests are blocked #35

Closed viciu closed 5 years ago

viciu commented 6 years ago

I've installed the plugin but it seems it doesn't work under https:

Mixed Content: The page at 'https://redmine.org/issues/12284' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://redmine.org/issues/12284?issue_count=22&issue_position=1&next_issue_id=12245'. This request has been blocked; the content must be served over HTTPS.
issue_dynamic_edit.js:345  -------- Error while updating the issue attribute dynamically -------- 
issue_dynamic_edit.js:346  xhr data: 
issue_dynamic_edit.js:347 {readyState: 0, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
issue_dynamic_edit.js:348  msg data: 
issue_dynamic_edit.js:349 error
issue_dynamic_edit.js:350  error data: 
issue_dynamic_edit.js:351 
issue_dynamic_edit.js:352  ---------------------------------------------------------- 

LOCATION_HREF

"https://redmine.org/issues/12284"
Bodge-IT commented 5 years ago

I get the same issue. But I realise its not the fault of your code. You're calling in window.location.href which to my users outside looks like an https url however internally it is http but being converted through nginx in a docker container. (Forgive me if my explanation not exact but you should get the idea.) Could you add (as a feature) an option to dictate if the site is https or not? Or will that not work?

Ilogeek commented 5 years ago

Hi !

As @Bodge-IT mentionned (thank you for your message), the plugin uses the current URL of the webpage to perform specific AJAX calls. You must be sure that your server configuration is correct and forces user to be redirected to your https version of your Redmine instance.

I've also updated the plugin and added a new configuration file where you can force https request. I'm not sure it will resolve your problem because it looks like a server configuration issue but it's the max I can do.

If you find the plugin helpful, please take a minute to star it on Github and rate it 5 stars on http://www.redmine.org/plugins/redmine_issue_dynamic_edit 👍