Change protocol to https.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2017-05-25 13:30:29 +02:00
parent a75dfbfffe
commit c09ed68423
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@
### Version 0.3 (unreleased) ### Version 0.3 (unreleased)
* Change protocol to https.
* Make cache validity configurable. * Make cache validity configurable.
* Rename from "DejureIntegrator" to "DejureAutolinker". * Rename from "DejureIntegrator" to "DejureAutolinker".
* Create cache dir recursively. * Create cache dir recursively.

View file

@ -80,12 +80,12 @@ module Nanoc::Filters
end end
def call_dejure (input, params={}) def call_dejure (input, params={})
prot = 'http://' prot = 'https://'
host = 'rechtsnetz.dejure.org' host = 'rechtsnetz.dejure.org'
path = '/dienste/vernetzung/vernetzen' path = '/dienste/vernetzung/vernetzen'
uri = URI(prot + host + path) uri = URI(prot + host + path)
http = Net::HTTP.new(uri.host, uri.port) http = Net::HTTP.new(uri.host)
request = Net::HTTP::Post.new(uri.request_uri) request = Net::HTTP::Post.new(uri.request_uri)
request['User-Agent'] = params[:Anbieterkennung] + ' (DejureAutolinker for nanoc ruby-' + params[:version] + ')' request['User-Agent'] = params[:Anbieterkennung] + ' (DejureAutolinker for nanoc ruby-' + params[:version] + ')'
request['Content-Type'] = 'application/x-www-form-urlencoded' request['Content-Type'] = 'application/x-www-form-urlencoded'