添加账号修改,后台管理
This commit is contained in:
@@ -17,6 +17,18 @@ const CONTENT_TYPES = new Map([
|
||||
['.webmanifest', 'application/manifest+json; charset=utf-8'],
|
||||
]);
|
||||
|
||||
const FRONTEND_SPA_ALIASES = [
|
||||
'overview',
|
||||
'files',
|
||||
'school',
|
||||
'games',
|
||||
'login',
|
||||
'admin',
|
||||
'admin/users',
|
||||
'admin/files',
|
||||
'admin/schoolSnapshots',
|
||||
];
|
||||
|
||||
export function normalizeEndpoint(endpoint) {
|
||||
return endpoint.replace(/^https?:\/\//, '').replace(/\/+$/, '');
|
||||
}
|
||||
@@ -44,6 +56,18 @@ export function getContentType(relativePath) {
|
||||
return CONTENT_TYPES.get(ext) || 'application/octet-stream';
|
||||
}
|
||||
|
||||
export function getFrontendSpaAliasKeys() {
|
||||
return FRONTEND_SPA_ALIASES.flatMap((alias) => [
|
||||
alias,
|
||||
`${alias}/`,
|
||||
`${alias}/index.html`,
|
||||
]);
|
||||
}
|
||||
|
||||
export function getFrontendSpaAliasContentType() {
|
||||
return 'text/html; charset=utf-8';
|
||||
}
|
||||
|
||||
export function createAuthorizationHeader({
|
||||
method,
|
||||
bucket,
|
||||
|
||||
Reference in New Issue
Block a user