X-Git-Url: http://git.purplebirdman.com/public.git/blobdiff_plain/3f8841faeb5ebf430feba9878a46b41cbd93c015..78944fffed51306762c335cbd7c6e16170dad9e3:/lua/publish.lua diff --git a/lua/publish.lua b/lua/publish.lua index 5fa18c0..a132c70 100644 --- a/lua/publish.lua +++ b/lua/publish.lua @@ -25,9 +25,13 @@ function handle(r) if pattern then local nonce = publish(r.context_document_root, pattern) - local uri = ("%s://%s:%s/%s"):format( - r.is_https and "https" or "http", - r.server_name, r.port, nonce) + + -- if FQDN override is set, + -- use override instead of my own server name and port number + local fqdn = os.getenv('PUBLIC_FQDN_OVERRIDE') + fqdn = fqdn or (r.is_https and "https" or "http") .. "://" .. r.server_name .. ":" ..r.port + + local uri = ("%s/%s"):format(fqdn, nonce) r:puts( ([[%s]]):format(uri, uri) ) else local template = get_form(r.context_document_root)