fix: satisfy deploy lint gate for S3 compatibility work

- Apply Biome organize-import/formatting fixes across changed S3 files
- Replace remaining string concatenations with template literals for lint
- Make home page inline handlers explicit via window.* and add button types
- Clean S3 auth lint issues with dot-property access and optional chaining
- Keep GetObject proxy and production/S3 SDK tests passing

Verification:
- bun run lint (0 errors, 1 CSS specificity warning)
- S3_SECRET_KEY=<env> bun test test/production-e2e.test.ts (29 pass)
- S3_SECRET_KEY=<env> bun test test/s3-sdk.test.ts (20 pass)
- bun test test/s3-auth.test.ts (5 pass)
This commit is contained in:
asepharyana
2026-07-07 03:07:51 +07:00
parent 06f93e30f6
commit 9a48fbf227
14 changed files with 161 additions and 124 deletions
+3 -3
View File
@@ -131,8 +131,8 @@ export const verifySignature = async (
s3SecretKey: string,
region: string,
): Promise<SigV4Result> => {
const authHeader = headers['authorization'];
if (!authHeader || !authHeader.startsWith('AWS4-HMAC-SHA256')) {
const authHeader = headers.authorization;
if (!authHeader?.startsWith('AWS4-HMAC-SHA256')) {
return { isValid: false, credential: null, errorCode: 'AccessDenied' };
}
@@ -276,6 +276,6 @@ export const verifyPresignedUrl = async (
};
export const isS3Request = (headers: Record<string, string>): boolean => {
const auth = headers['authorization'] || '';
const auth = headers.authorization || '';
return auth.startsWith('AWS4-HMAC-SHA256');
};