Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions lib/reliability/retryMetrics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Stub for retry metrics — provides a reset function used by vitest.setup.ts
* between tests.
*/

let _callCount = 0;
let _failureCount = 0;

export const retryMetrics = {
increment() {
_callCount++;
},
failure() {
_failureCount++;
},
get callCount() {
return _callCount;
},
get failureCount() {
return _failureCount;
},
reset() {
_callCount = 0;
_failureCount = 0;
},
};

export function resetRetryMetrics(): void {
retryMetrics.reset();
}
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const nextConfig = {
headers: [
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
// X-XSS-Protection enables the browser's built-in XSS filter (IE/Chrome legacy).
// Modern browsers rely on CSP instead, but this header provides defence-in-depth
// for older clients. Mode=block prevents partial rendering of detected attacks.
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Strict-Transport-Security',
Expand Down
Loading