Commit 6f68adf6 authored by Owen Jacobson's avatar Owen Jacobson Committed by Terence Lee

Set encoding on text responses.

parent f9a8d6f4
...@@ -28,6 +28,15 @@ This allows you to specify a different asset root for the directory of your appl ...@@ -28,6 +28,15 @@ This allows you to specify a different asset root for the directory of your appl
By default this is set to `public_html/` By default this is set to `public_html/`
#### Default Character Set
This allows you to specify a character set for your text assets (HTML, Javascript, CSS, and so on). For most apps, this should be the default value of "UTF-8", but you can override it by setting `encoding`:
```json
{
"encoding": "US-ASCII"
}
```
#### Clean URLs #### Clean URLs
For SEO purposes, you can drop the `.html` extension from URLs for say a blog site. This means users could go to `/foo` instead of `/foo.html`. For SEO purposes, you can drop the `.html` extension from URLs for say a blog site. This means users could go to `/foo` instead of `/foo.html`.
......
...@@ -9,6 +9,7 @@ class NginxConfig ...@@ -9,6 +9,7 @@ class NginxConfig
json["worker_connections"] ||= ENV["WORKER_CONNECTIONS"] || 512 json["worker_connections"] ||= ENV["WORKER_CONNECTIONS"] || 512
json["port"] ||= ENV["PORT"] || 5000 json["port"] ||= ENV["PORT"] || 5000
json["root"] ||= "public_html/" json["root"] ||= "public_html/"
json["encoding"] ||= "UTF-8"
json["proxies"] ||= {} json["proxies"] ||= {}
json["proxies"].each do |loc, hash| json["proxies"].each do |loc, hash|
if hash["origin"][-1] != "/" if hash["origin"][-1] != "/"
......
...@@ -34,6 +34,7 @@ http { ...@@ -34,6 +34,7 @@ http {
server { server {
listen <%= port %> reuseport; listen <%= port %> reuseport;
charset <%= encoding %>;
port_in_redirect off; port_in_redirect off;
keepalive_timeout 5; keepalive_timeout 5;
root <%= root %>; root <%= root %>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment