ms_deploy 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,8 @@ Capistrano::Configuration.instance.load do
|
|
|
43
43
|
'optional_http_content' => fetch(:optional_nginx_server_http_content, ''),
|
|
44
44
|
'optional_https_content' => fetch(:optional_nginx_server_https_content, ''),
|
|
45
45
|
'cert_type' => fetch(:cert_type, 'pem'),
|
|
46
|
-
'key_type' => fetch(:cert_type, 'key')
|
|
46
|
+
'key_type' => fetch(:cert_type, 'key'),
|
|
47
|
+
'serve_static_files' => fetch(:serve_static_files, true),
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
if protocol.nil? or protocol == 'http' or protocol == 'both'
|
|
@@ -47,21 +47,18 @@ server {
|
|
|
47
47
|
|
|
48
48
|
client_max_body_size 4G;
|
|
49
49
|
|
|
50
|
+
<% if serve_static_files %>
|
|
51
|
+
|
|
50
52
|
# path for static files
|
|
51
53
|
root <%= project_root %>/public;
|
|
52
54
|
|
|
53
|
-
### Stop Image and Document Hijacking
|
|
54
|
-
#location ~* (\.jpg|\.png|\.css)$ {
|
|
55
|
-
# if ($http_referer !~ ^(http://mydomain.com) ) {
|
|
56
|
-
# return 405;
|
|
57
|
-
# }
|
|
58
|
-
#}
|
|
59
|
-
|
|
60
55
|
<% if with_file_expire_max %>
|
|
61
56
|
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
|
|
62
57
|
expires max;
|
|
63
58
|
break;
|
|
64
59
|
}
|
|
60
|
+
<% end %>
|
|
61
|
+
|
|
65
62
|
<% end %>
|
|
66
63
|
|
|
67
64
|
<%= optional_http_content if protocol == 'http' %>
|
data/lib/ms_deploy/version.rb
CHANGED