updated to new storage schema
This commit is contained in:
@@ -19,12 +19,17 @@ function handle_header(req) {
|
||||
let old = ""
|
||||
|
||||
function url_redirect (req) {
|
||||
let b64 = btoa(req.url)
|
||||
|
||||
let url = new URL(req.url);
|
||||
let path = url.pathname;
|
||||
let domain = url.hostname;
|
||||
|
||||
let b64 = btoa(path)
|
||||
if (!req.url.startsWith("http://localhost")) {
|
||||
old = req.url
|
||||
// console.debug(`Loading: ${req.url} || ${b64}`);
|
||||
return {
|
||||
redirectUrl: `http://localhost:4433/s3/${b64}`
|
||||
redirectUrl: `http://localhost:4433/s3/${domain}/${b64}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user