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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## <small>2.3.3-stage.2 (2026-01-05)</small>

* fix: update qs to 6.14.1 to url dependency (#342) ([a125cb5](https://github.com/aziontech/lib/commit/a125cb5)), closes [#342](https://github.com/aziontech/lib/issues/342)

## <small>2.3.3-stage.1 (2026-01-05)</small>

* fix: update metadata object for firewall requests (#341) ([88b5601](https://github.com/aziontech/lib/commit/88b5601)), closes [#341](https://github.com/aziontech/lib/issues/341)

## <small>2.3.2 (2025-12-18)</small>

* Merge pull request #339 from aziontech/stage ([ea7606f](https://github.com/aziontech/lib/commit/ea7606f)), closes [#339](https://github.com/aziontech/lib/issues/339)
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azion",
"version": "2.3.2",
"version": "2.3.3-stage.2",
"description": "Azion Packages for Edge Computing.",
"scripts": {
"prepare": "husky",
Expand Down Expand Up @@ -278,5 +278,5 @@
"vm-browserify": "^1.1.2",
"webpack": "^5.101.3"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "npm@9.9.0+sha512.c2477bb23cf82a676675d61071dd1a4cfef73f5704b8f95e91eba5cf88d30de315c7f668e57679290d73dde53357743f599a443b43495d3ac3e453457ba7e108"
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ class FirewallEventContext extends primitives.FetchEvent {

#metadata() {
return {
client_fingerprint: 'client',
client_id: '0123a',
configuration_id: '123',
edge_connector_id: '-',
function_id: '456',
geoip_asn: '14061',
geoip_city: 'Clifton',
geoip_city_continent_code: 'NA',
geoip_city_country_code: 'US',
geoip_city_country_name: 'United States',
Expand All @@ -68,14 +75,18 @@ class FirewallEventContext extends primitives.FetchEvent {
geoip_country_name: 'United States',
geoip_region: 'NJ',
geoip_region_name: 'New Jersey',
http_ssl_ja4: 'ja4',
remote_addr: '127.0.0.1',
remote_port: '33440',
remote_user: null,
request_id: '0123456789abc',
server_fingerprint: 'ja4',
server_fingerprint_ja4h: 'ja4h',
server_protocol: 'HTTP/1.1',
solution_id: '123',
ssl_cipher: null,
ssl_protocol: null,
geoip_asn: '14061',
geoip_city: 'Clifton',
virtualhost_id: '789',
};
}

Expand Down
12 changes: 12 additions & 0 deletions packages/presets/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,23 @@ export interface AzionRequestMetadata {

// Server
server_protocol: string;
server_fingerprint: string;
server_fingerprint_ja4h: string;

// TLS
ssl_cipher: string;
ssl_protocol: string;

// Other
client_fingerprint: string;
client_id: string;
configuration_id: string;
edge_connector_id: string;
function_id: string;
http_ssl_ja4: string;
request_id: string;
solution_id: string;

// Allows additional unspecified fields
[key: string]: string;
}
Expand Down
12 changes: 12 additions & 0 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,23 @@ export interface AzionRuntimeRequestMetadata {

// Server
server_protocol: string;
server_fingerprint: string;
server_fingerprint_ja4h: string;

// TLS
ssl_cipher: string;
ssl_protocol: string;

// Other
client_fingerprint: string;
client_id: string;
configuration_id: string;
edge_connector_id: string;
function_id: string;
http_ssl_ja4: string;
request_id: string;
solution_id: string;

// Allows additional unspecified fields
[key: string]: string;
}
Expand Down
19 changes: 19 additions & 0 deletions packages/utils/src/edge/parseRequest/parseRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ describe('parseRequest', () => {

beforeEach(() => {
mockMetadata = {
client_fingerprint: 'client',
client_id: '0123a',
configuration_id: '123',
edge_connector_id: '-',
function_id: '456',
geoip_asn: '12345',
geoip_city: 'Sao Paulo',
geoip_city_continent_code: 'SA',
Expand All @@ -17,12 +22,18 @@ describe('parseRequest', () => {
geoip_country_name: 'Brazil',
geoip_region: 'SP',
geoip_region_name: 'Sao Paulo',
http_ssl_ja4: 'ja4',
remote_addr: '192.168.1.1',
remote_port: '12345',
remote_user: '',
request_id: '0123456789abc',
server_fingerprint: 'ja4',
server_fingerprint_ja4h: 'ja4h',
server_protocol: 'HTTP/1.1',
solution_id: '123',
ssl_cipher: 'TLS_AES_256_GCM_SHA384',
ssl_protocol: 'TLSv1.3',
virtualhost_id: '789',
};

mockRequest = Object.assign(
Expand Down Expand Up @@ -163,4 +174,12 @@ describe('parseRequest', () => {
expect(result.metadata.ssl_cipher).toBe('TLS_AES_256_GCM_SHA384');
expect(result.metadata.ssl_protocol).toBe('TLSv1.3');
});

it('should correctly parse fingerprint information from metadata', async () => {
const result = await parseRequest(mockRequest);

expect(result.metadata.client_fingerprint).toBe('client');
expect(result.metadata.server_fingerprint).toBe('ja4');
expect(result.metadata.server_fingerprint_ja4h).toBe('ja4h');
});
});