@hashrytech/quick-components-kit 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/modules/api-proxy.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,7 @@ export const defaultResponseHeaders = ['content-type', 'content-length', 'cache-
|
|
|
6
6
|
*/
|
|
7
7
|
export function createProxyHandlers(config) {
|
|
8
8
|
if (config.debug)
|
|
9
|
-
console.debug("Creating proxy handlers with config:", config);
|
|
9
|
+
console.debug("API Proxy: Creating proxy handlers with config:", config);
|
|
10
10
|
async function handler(event) {
|
|
11
11
|
const path = event.params.path;
|
|
12
12
|
const queryString = event.url.searchParams.toString();
|
|
@@ -14,7 +14,7 @@ export function createProxyHandlers(config) {
|
|
|
14
14
|
const fullPath = `/${path}${slash}${queryString ? `?${queryString}` : ''}`;
|
|
15
15
|
const url = `${config.host}${fullPath}`;
|
|
16
16
|
if (config.debug)
|
|
17
|
-
console.debug(`Proxying request to: ${url}`);
|
|
17
|
+
console.debug(`API Proxy: Proxying ${event.request.method} request to: ${url}`);
|
|
18
18
|
// Validate the path against allowed prefixes if specified
|
|
19
19
|
if (config.allowedPaths && config.allowedPaths.length > 0) {
|
|
20
20
|
const isAllowed = config.allowedPaths.some((prefix) => path?.startsWith(prefix));
|