-- 静态文件处理

local redis = require "resty.redis_iresty"
local red = redis:new()
local domain = string.gsub(ngx.var.host,'%.','_')
local results,err = red:hget("domain",domain)

if not results then
    ngx.exit(ngx.HTTP_FORBIDDEN)
end
local json = require("cjson.safe")
local domain_info  = json.decode(results)
ngx.var.tempalte_name = domain_info.t
