Defect #32891
Bookmark link on project page should not use full path with hostname
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Projects | |||
Target version: | 4.1.1 | |||
Resolution: | Fixed | Affected version: |
Description
Currently bookmark url creating with default protocol. If rails server setup with secure protocol bookmarks link still creating with http.
Jquery raises error on that kind of links:
jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1574665137:24 Mixed Content: The page at 'https://redmine/projects/1' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://redmine/projects/1/bookmark'. This request has been blocked; the content must be served over HTTPS.
Redmine provides an option to specify protocol in administration panel. It could be used to generate url:
--- app/helpers/projects_helper.rb (revision 1e830ee09f28f68d9019590e72b3612950724253)
+++ app/helpers/projects_helper.rb (revision 24843626abc3f32e8fe206689e8d3d728e610a50)
@@ -158,7 +158,7 @@
method = "post"
text = l(:button_project_bookmark)
end
- url = bookmark_project_url(project)
+ url = bookmark_project_url(project, :protocol => Setting.protocol)
link_to text, url, remote: true, method: method, class: css
end
Associated revisions
Don't use full path links with hostname
History
#1
Updated by Dmitry Makurin 12 months ago
I messed up with title a little bit. Bookmark link on project page.
#2
Updated by Marius BALTEANU 11 months ago
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 4.1.1
r19530 should fix this issue.
#3
Updated by Marius BALTEANU 11 months ago
- Subject changed from Bookmark link in project jump box to Bookmark link on project page
#5
Updated by Jean-Philippe Lang 10 months ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
Merged.
#6
Updated by Jean-Philippe Lang 10 months ago
- Subject changed from Bookmark link on project page to Bookmark link on project page should not use full path with hostname