Index

joshstock.in / 4deb1aa

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
9512 Dec 2020 00:224deb1aaUpdate lua-gitwebJosh Stockin1230G

Blob @ joshstock.in / lua-gitweb / request.lua

text/plain391 bytesdownload raw
1-- request.lua
2-- URI parsing
3
4-- Copyright (c) 2020 Joshua 'joshuas3' Stockin
5-- <https://joshstock.in>
6
7local utils = require("utils")
8
9local _M = {}
10
11_M.parse_uri = function()
12 local uri = ngx.var.uri
13 local split = string.split(string.sub(uri,2),"/")
14
15 local parsed = {}
16 parsed.uri = uri
17 parsed.parts = split
18 parsed.repo = split[1]
19
20 return parsed
21end
22
23return _M
24