mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
update compile map to support domain wildcards
This commit is contained in:
parent
f69312e42e
commit
f7b81c33e2
1 changed files with 6 additions and 1 deletions
7
Rakefile
7
Rakefile
|
@ -79,7 +79,12 @@ end
|
||||||
|
|
||||||
desc 'Compile domain map for nginx'
|
desc 'Compile domain map for nginx'
|
||||||
task :compile_domain_map => [:environment] do
|
task :compile_domain_map => [:environment] do
|
||||||
File.open('./files/map.txt', 'w'){|f| Site.exclude(domain: nil).exclude(domain: '').select(:username,:domain).all.collect {|s| f.write "#{s.domain} #{s.username};\n" }}
|
File.open('./files/map.txt', 'w') do |file|
|
||||||
|
Site.exclude(domain: nil).exclude(domain: '').select(:username,:domain).all.collect do |site|
|
||||||
|
file.write "#{site.domain} #{site.username};\n"
|
||||||
|
file.write "*.#{site.domain} #{site.username};\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Produce SSL config package for proxy'
|
desc 'Produce SSL config package for proxy'
|
||||||
|
|
Loading…
Add table
Reference in a new issue