mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing share bookmarklet by forcing https.
This commit is contained in:
parent
8880c22c59
commit
de95d653b4
2 changed files with 7 additions and 5 deletions
|
@ -32,9 +32,9 @@ defaults
|
|||
|
||||
frontend public
|
||||
bind :80
|
||||
bind :443 ssl crt newsblur.pem no-tls-tickets ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-RC4-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA:RC4-SHA no-sslv3
|
||||
acl secure dst_port eq 443
|
||||
rspadd Strict-Transport-Security:\ max-age=31536000;\ includeSubDomains
|
||||
bind :443 ssl crt newsblur.pem
|
||||
# acl secure dst_port eq 443
|
||||
# rspadd Strict-Transport-Security:\ max-age=31536000;\ includeSubDomains
|
||||
option http-server-close
|
||||
|
||||
# Redirect all HTTP traffic to HTTPS
|
||||
|
|
|
@ -405,7 +405,7 @@
|
|||
// = Share story =
|
||||
// ===============
|
||||
|
||||
share_story: function() {
|
||||
share_story: function(disable_https) {
|
||||
var $share = $(".NB-bookmarklet-comment-submit", this.$modal);
|
||||
var $error = $(".NB-bookmarklet-comment-error", this.$modal);
|
||||
|
||||
|
@ -415,9 +415,11 @@
|
|||
$share.addClass('NB-disabled').text('Sharing...');
|
||||
this.feed = this.feed || {};
|
||||
|
||||
var scheme = {% if debug %}'http'{% else %}'https'{% endif %};
|
||||
var url = scheme + '://' + this.domain + "{% url "api-share-story" token %}";
|
||||
|
||||
$.ajax({
|
||||
url: '//'+this.domain+"{% url "api-share-story" token %}",
|
||||
url: url,
|
||||
type: 'POST',
|
||||
data: {
|
||||
title: $(".NB-bookmarklet-page-title", this.$modal).html() || this.story_title,
|
||||
|
|
Loading…
Add table
Reference in a new issue