mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Support OnHttpRequest Lua callback
If your redbean `/.init.lua` file defines a global callable named `OnHttpRequest` then redbean will delegate all serving control to your function. You may then restore the default serving paths, by calling the new `Route()`, `RouteHost()`, and `RoutePath()` APIs. Closes #150
This commit is contained in:
parent
dc6d11a031
commit
472b95fea3
13 changed files with 671 additions and 568 deletions
11
tool/net/demo/404.html
Normal file
11
tool/net/demo/404.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>404 not found</title>
|
||||
|
||||
<pre aria-label="404 not found">
|
||||
_ _ ___ _ _ _ __ _
|
||||
| || | / _ \| || | _ __ ___ | |_ / _| ___ _ _ _ __ __| |
|
||||
| || |_| | | | || |_ | '_ \ / _ \| __| | |_ / _ \| | | | '_ \ / _` |
|
||||
|__ _| |_| |__ _| | | | | (_) | |_ | _| (_) | |_| | | | | (_| |
|
||||
|_| \___/ |_| |_| |_|\___/ \__| |_| \___/ \__,_|_| |_|\__,_|
|
||||
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue