Redo frontend and dockerfile to use nginx and build in stages based on prod steps in romm

This commit is contained in:
2026-01-07 23:05:27 -05:00
parent 9e5f377768
commit 3f9cab66f5
5 changed files with 285 additions and 32 deletions

19
decode.js Normal file
View File

@@ -0,0 +1,19 @@
// Decode a Base64 encoded string received as a query parameter named 'value',
// and return the decoded value in the response body.
function decodeBase64(r) {
var encodedValue = r.args.value;
if (!encodedValue) {
r.return(400, "Missing 'value' query parameter");
return;
}
try {
var decodedValue = atob(encodedValue);
r.return(200, decodedValue);
} catch (e) {
r.return(400, "Invalid Base64 encoding");
}
}
export default { decodeBase64 };