Merge pull request 'Re-enable and improve Tor access for kosmos.social' (#292) from feature/mastodon_tor into master
Reviewed-on: #292
This commit is contained in:
commit
e31f9ced96
|
@ -8,5 +8,5 @@ node.default["kosmos-mastodon"]["sidekiq_threads"] = 25
|
|||
node.default["kosmos-mastodon"]["elasticsearch"]["allocated_memory"] = "1536m"
|
||||
|
||||
node.override["tor"]["HiddenServices"]["mastodon"] = {
|
||||
"HiddenServicePorts" => ["80 127.0.0.1:80"]
|
||||
"HiddenServicePorts" => ["80 127.0.0.1:80", "443 127.0.0.1:443"]
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
mastodon_path = node["kosmos-mastodon"]["directory"]
|
||||
server_name = node["kosmos-mastodon"]["server_name"]
|
||||
|
||||
node.override['nginx']['server_names_hash_bucket_size'] = 128
|
||||
include_recipe "kosmos-nginx"
|
||||
|
||||
directory "#{node['nginx']['dir']}/snippets" do
|
||||
|
|
|
@ -24,3 +24,16 @@ server {
|
|||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
}
|
||||
<% end %>
|
||||
|
||||
<% if @onion_address %>
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name mastodon.<%= @onion_address %>;
|
||||
include <%= @shared_config_path %>;
|
||||
|
||||
ssl_certificate <%= @ssl_cert %>;
|
||||
ssl_certificate_key <%= @ssl_key %>;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
}
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue