Skip to content

Commit 8bbe1bd

Browse files
authored
Merge pull request #2672 from pangeacyber/cfagan/api-path-prefix
Upate vanilla js to support apiPathPrefix string
2 parents fa7d803 + 183ff48 commit 8bbe1bd

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

packages/vanilla-js/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.16] - 2025-11-19
9+
10+
### Added
11+
12+
- Switch usePathApi to apiPathPrefix is set
13+
814
## [0.1.15] - 2025-09-26
915

1016
### Added

packages/vanilla-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pangeacyber/vanilla-js",
33
"description": "Generic javascript integrations with Pangea",
4-
"version": "0.1.15",
4+
"version": "0.1.16",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/index.d.ts",

packages/vanilla-js/src/AuthNClient/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ export class AuthNClient {
155155
version_ = `${version}${!!version ? "/" : ""}`;
156156
}
157157

158-
if (!!this.config.usePathApi) {
159-
return `${window.location.origin}/api/authn/${version_}${endpoint}`;
158+
if (!!this.config.apiPathPrefix) {
159+
return `${window.location.origin}${this.config.apiPathPrefix}${version_}${endpoint}`;
160160
}
161161

162162
return `${protocol}://authn.${this.config.domain}/${version_}${endpoint}`;

packages/vanilla-js/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface ClientConfig {
1414
domain: string;
1515
clientToken: string;
1616
callbackUri?: string;
17-
usePathApi?: boolean;
17+
apiPathPrefix?: string;
1818
}
1919

2020
/**

0 commit comments

Comments
 (0)