Add pastekitten.com domain
This commit is contained in:
parent
897fa2d3cb
commit
78aed88570
|
@ -3,8 +3,9 @@ upstream pastekitten_unicorns {
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen pm.localhots.xxx:80;
|
listen pastekitten.com:80;
|
||||||
server_name pm.localhots.xxx;
|
server_name pastekitten.com www.pastekitten.com pm.localhots.xxx;
|
||||||
|
|
||||||
root /home/www/apps/pastekitten/current;
|
root /home/www/apps/pastekitten/current;
|
||||||
client_max_body_size 10M;
|
client_max_body_size 10M;
|
||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
|
|
@ -51,6 +51,10 @@ class Pastekitten < Sinatra::Application
|
||||||
css_compression :simple
|
css_compression :simple
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
|
correct_domain_name
|
||||||
|
end
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
@syntaxes = CONFIG.syntaxes_map
|
@syntaxes = CONFIG.syntaxes_map
|
||||||
|
|
||||||
|
@ -78,4 +82,10 @@ class Pastekitten < Sinatra::Application
|
||||||
forbidden
|
forbidden
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue