-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update SLAS private proxy path #1752
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"packages": [ | ||
"packages/*" | ||
] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
## v3.5.1 (Apr 17, 2024) | ||
|
||
## v3.5.0 (Apr 15, 2024) | ||
|
||
## v3.4.0 (Jan 19, 2024) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -678,6 +678,21 @@ export const RemoteServerFactory = { | |
if (incomingRequest.path?.match(options.applySLASPrivateClientToEndpoints)) { | ||
proxyRequest.setHeader('Authorization', `Basic ${encodedSlasCredentials}`) | ||
} | ||
}, | ||
onProxyRes: (proxyRes, req) => { | ||
if (proxyRes.statusCode && proxyRes.statusCode >= 400) { | ||
console.error( | ||
`Failed to proxy SLAS Private Client request - ${proxyRes.statusCode}` | ||
) | ||
console.error( | ||
`Please make sure you have enabled the SLAS Private Client Proxy in your ssr.js and set the correct environment variable PWA_KIT_SLAS_CLIENT_SECRET.` | ||
) | ||
console.error( | ||
`SLAS Private Client Proxy Request URL - ${req.protocol}://${req.get( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. log the full proxied request URL, this may help if user have configuration issues. |
||
'host' | ||
)}${req.originalUrl}` | ||
) | ||
} | ||
} | ||
}) | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a bug in the waiting here as well. Since the proxy path value is configurable we might run into issues if someone was to change that.