diff src/lib/Utils.luan @ 3:2c63b10781e1

add login
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 24 Oct 2024 21:43:44 -0600
parents
children 2da10ece826f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lib/Utils.luan	Thu Oct 24 21:43:44 2024 -0600
@@ -0,0 +1,13 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local Http = require "luan:http/Http.luan"
+
+
+local Utils = {}
+
+function Utils.base_url()
+	local request = Http.request
+	return request.scheme.."://"..request.headers["Host"]
+end
+
+return Utils