Skip to content

Commit

Permalink
payload generation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bartes committed Jul 25, 2022
1 parent 350e560 commit 6497b3a
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 142 deletions.
2 changes: 1 addition & 1 deletion src/Castle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
import { Configuration } from './configuraton';

export class Castle {
private configuration: Configuration;
public configuration: Configuration;

constructor(configAttributes) {
this.configuration = new Configuration(configAttributes);
Expand Down
2 changes: 1 addition & 1 deletion src/headers/services/headers-extract.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ALWAYS_DENYLISTED = ['cookie', 'authorization'];

export const HeadersExtractService = {
call: (
headers: IncomingHttpHeaders,
headers: IncomingHttpHeaders | { [key: string]: string },
configuration: Configuration
): { [key: string]: boolean | string } => {
return reduce(
Expand Down
2 changes: 1 addition & 1 deletion src/payload/models/filter_payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export interface FilterPayload {
properties?: object;
context: {
ip: string;
headers: IncomingHttpHeaders;
headers: IncomingHttpHeaders | { [key: string]: string | boolean };
};
}
2 changes: 1 addition & 1 deletion src/payload/models/log_payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export interface LogPayload {
properties?: object;
context?: {
ip?: string;
headers?: IncomingHttpHeaders;
headers: IncomingHttpHeaders | { [key: string]: string | boolean };
};
}
2 changes: 1 addition & 1 deletion src/payload/models/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface Payload {
device_token?: string;
context?: {
ip: string;
headers: IncomingHttpHeaders;
headers: IncomingHttpHeaders | { [key: string]: string | boolean };
};
}
2 changes: 1 addition & 1 deletion src/payload/models/risk_payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export interface RiskPayload {
properties?: object;
context: {
ip: string;
headers: IncomingHttpHeaders;
headers: IncomingHttpHeaders | { [key: string]: string | boolean };
};
}
Loading

0 comments on commit 6497b3a

Please sign in to comment.