Refactor request handling and improve Docker detection

Refactored the main request handler in src/index.js for improved readability and error handling. Enhanced Docker request detection in validation.js to include additional Content-Type checks. Updated tests to increase timeouts and expand expected status codes for container registry platforms.
This commit is contained in:
xixu-me committed 2025-12-10 15:47:25 +08:00
1 parent b81b3968d9
commit cb0bb2da2f
5 files changed
+618 -496

No files matched your search

+1 -1
View File
@@ -240,7 +240,7 @@ describe('Security Features', () => {
it('should provide generic error messages', async () => {
const response = await SELF.fetch('https://example.com/gh/test/repo', {
method: 'INVALID',
method: 'TRACE',
redirect: 'manual'
});