17 lines
395 B
Lua
17 lines
395 B
Lua
local cache = require("cache")
|
|
local config = require("config")
|
|
local pages = require("pages")
|
|
|
|
|
|
local function claim_get(req)
|
|
--Get the page to claim a name
|
|
local cachestr = string.format("%s/_claim",config.domain)
|
|
local text = cache.render(cachestr,function()
|
|
print("cache miss, rendering claim page")
|
|
return pages.claim{err=""}
|
|
end)
|
|
http_response(req,200,text)
|
|
end
|
|
|
|
return claim_get
|