Files
Gabriel Massadas 15553eb822 Bundle dashboard with worker assets (#73)
* Bundle dashboard with worker assets

* Show server configs in info side menu
2024-12-15 00:05:06 +00:00

23 lines
443 B
TypeScript

import { R2Explorer } from "../src";
const baseConfig = {
readonly: false,
cors: true,
showHiddenFiles: true
};
export default {
async email(event, env, context) {
await R2Explorer(baseConfig).email(event, env, context);
},
async fetch(request, env, context) {
return R2Explorer({
...baseConfig,
basicAuth: {
username: env.BASIC_USERNAME,
password: env.BASIC_PASSWORD,
},
}).fetch(request, env, context);
},
};