@alliance-droid/status-feedback-system 4.2.0 → 4.2.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/sveltekit/server.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.2.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- SvelteKit feedback proxy: private-app authentication/authorization now runs before missing proxy configuration is reported, so unauthenticated callers receive `401` instead of learning whether `SF_API_URL` / `SF_API_KEY` are configured.
|
|
8
|
+
|
|
3
9
|
## 4.2.0
|
|
4
10
|
|
|
5
11
|
### Added
|
package/dist/sveltekit/server.js
CHANGED
|
@@ -31,9 +31,6 @@ async function handleProxyRequest(event, options) {
|
|
|
31
31
|
const route = getRouteSpec(event.request.method, resolvedPath.path);
|
|
32
32
|
if (!route)
|
|
33
33
|
return feedbackError(404, 'Feedback endpoint not found');
|
|
34
|
-
const config = await getResolvedConfig(options);
|
|
35
|
-
if (!config)
|
|
36
|
-
return feedbackError(503, 'Feedback service is not configured');
|
|
37
34
|
const user = options.resolveUser ? await options.resolveUser(event) : null;
|
|
38
35
|
const requireUser = await shouldRequireUser(event, options, route.operation, resolvedPath.source);
|
|
39
36
|
if (requireUser && !user)
|
|
@@ -56,6 +53,9 @@ async function handleProxyRequest(event, options) {
|
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
}
|
|
56
|
+
const config = await getResolvedConfig(options);
|
|
57
|
+
if (!config)
|
|
58
|
+
return feedbackError(503, 'Feedback service is not configured');
|
|
59
59
|
const upstreamUrl = buildUpstreamUrl(config.apiUrl, route.upstreamPath, copyAllowedSearchParams(event.url.searchParams, route.allowedSearchParams ?? []));
|
|
60
60
|
const headers = new Headers({
|
|
61
61
|
Accept: 'application/json',
|
package/package.json
CHANGED