Add pastekitten.com domain
This commit is contained in:
parent
897fa2d3cb
commit
78aed88570
|
@ -3,8 +3,9 @@ upstream pastekitten_unicorns {
|
|||
}
|
||||
|
||||
server {
|
||||
listen pm.localhots.xxx:80;
|
||||
server_name pm.localhots.xxx;
|
||||
listen pastekitten.com:80;
|
||||
server_name pastekitten.com www.pastekitten.com pm.localhots.xxx;
|
||||
|
||||
root /home/www/apps/pastekitten/current;
|
||||
client_max_body_size 10M;
|
||||
keepalive_timeout 5;
|
||||
|
|
|
@ -51,6 +51,10 @@ class Pastekitten < Sinatra::Application
|
|||
css_compression :simple
|
||||
end
|
||||
|
||||
before do
|
||||
correct_domain_name
|
||||
end
|
||||
|
||||
get '/' do
|
||||
@syntaxes = CONFIG.syntaxes_map
|
||||
|
||||
|
@ -78,4 +82,10 @@ class Pastekitten < Sinatra::Application
|
|||
forbidden
|
||||
end
|
||||
end
|
||||
|
||||
def correct_domain_name
|
||||
if %w[ www.pastekitten.com pm.localhots.xxx ].include?(request.host)
|
||||
redirect 'http://pastekitten.com' + request.fullpath
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue