Skip to content

Instantly share code, notes, and snippets.

View pondahai's full-sized avatar

彭大海 pondahai

View GitHub Profile
@tylerneylon
tylerneylon / json.lua
Last active July 9, 2024 03:25
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@tomasinouk
tomasinouk / CORS_on_OpenWRT_UCI.md
Last active October 11, 2022 08:39
CORS on OpenWRT UCI

To implement Cross-Origin Resource Sharing (CORS) on OpenWRT within Luci is actually simple.

After very long search, I have found code in uHTTPd on gitlab, which clearly shows option for CORS. I haven't found anything, which would describe how to actually configure it.

There is nothing in uHTTPd documentation describing this functionally, /etc/config/uhttpd does not mention anything either.

Luckily, you can have a look into how the process is starting and what parameters is checking.

doing