-
Notifications
You must be signed in to change notification settings - Fork 278
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
[Headless SSR Proxy] Fix shape of config object #979
[Headless SSR Proxy] Fix shape of config object #979
Conversation
…Config.ts and changed the shape of ProxyConfig interaface. Implemented the new LayoutServiceData in the sitecore-jss-proxy/index.ts and added the type Error to replyWithError arg.
…less-ssr-experience-edge and create-sitecore-jss/node-headless-ssr-proxy templates about the use of .env files.
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.
Looks good! See one comment below
@ambrauer Can you also look at the PR, please? You asked to add changes to the README.md, good point
@@ -75,7 +75,7 @@ export interface ProxyConfig { | |||
/** Responses from the proxy greater than this size (in bytes) are rejected. */ | |||
maxResponseSizeBytes?: number; | |||
/** The require'd server.bundle.js file from your pre-built JSS app */ | |||
serverBundle: { | |||
serverBundle?: { |
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.
Make it required, and fix unit tests
| `DEFAULT_LANGUAGE` | The JSS app's default language. Used to determine language context in case language is not specified in request URL. | | ||
| `PORT` | Optional. Port which will be used when start sample. Default can be seen in [config.js](./config.js). | | ||
|
||
These environment variables can be set in the .env file located in the root of the app. |
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.
Let's put this into the statement above the table (it might get lost down here). Something like:
"The following environment variables can be set to configure the proxy instead of modifying config.js
. You can use the .env file located in the root of the app or set these directly in the environment (for example, in containers)."
@@ -45,6 +46,8 @@ The following environment variables can be set to configure the proxy instead of | |||
| `SITECORE_PATH_REWRITE_EXCLUDE_ROUTES` | Optional. Pipe-separated list of absolute paths that should not be rendered through SSR. Defaults can be seen in [config.js](./config.js). | | |||
| `SITECORE_ENABLE_DEBUG` | Optional. Writes verbose request info to stdout for debugging. Defaults to `false`. | | |||
|
|||
These environment variables can be set in the .env file located in the root of the app. |
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.
Same here (put into statement above the table).
… we provide to test (now it's typed and has serverBundle property). Adjusted the description for environment variables
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.
Looks great! 👍
Description / Motivation
Testing Details
Types of changes