-
Notifications
You must be signed in to change notification settings - Fork 39
Add custom hostname support #359
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4e866f8
Route Edge requests and returned URLs through SITECORE_EDGE_HOSTNAME
MenKNas a580791
Fix failing test
MenKNas a72243c
Fix error pages null handling + document custom Edge hostname env vars
MenKNas 52709e2
Fix failing api verification issue
MenKNas 90871de
Minor comment adjustments
MenKNas 6fb96ae
Adjust CHANGELOG.md
MenKNas 6224c9c
Fix regex analysis issue
MenKNas 45d9344
Fix verify api extractor issue
MenKNas 64062b0
Fix api verification issue
MenKNas 49ba70e
Add opt-in layout URL rewrite for media content
MenKNas 6f04630
Merge branch 'dev' into feature/JSS-7383-add-custom-hostname-support
MenKNas c1b72b4
Potential fix for code scanning alert no. 50: Incomplete regular expr…
MenKNas c8b9073
Potential fix for code scanning alert no. 49: Incomplete regular expr…
MenKNas 25f5c7c
Fix api extractor issue
MenKNas eaeb11c
Address PR comments 1
MenKNas 7ed5bb4
Fix test related issue
MenKNas 1191572
Fix api-extractor issues and html related false warning
MenKNas 7b92bc5
Address PR comments 2
MenKNas cadf3fc
Fix API extractor issue
MenKNas f34cd5f
Address PR comments 3
MenKNas 243bcf9
Update packages/core/src/constants.ts
MenKNas f7a82fc
Adjustments
MenKNas 8fce771
Adjustments
MenKNas f22711f
Address PR comments 4
MenKNas f1c4c54
Address PR comments 5
MenKNas 62ed9fb
Fix API extractor issue
MenKNas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,36 @@ | ||
| import { constants } from '@sitecore-content-sdk/core'; | ||
| import { normalizeUrl } from '@sitecore-content-sdk/core/tools'; | ||
|
|
||
| const { SITECORE_EDGE_URL_DEFAULT } = constants; | ||
| /** | ||
| * Resolves the base Edge URL from config. Caller should pass the resolved Edge URL from config. | ||
| * @param {string} [sitecoreEdgeUrl] - The base Edge URL from config. Defaults to platform URL. | ||
| * @internal | ||
| */ | ||
| const getBaseEdgeUrl = ( | ||
| sitecoreEdgeUrl: string = constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT | ||
| ): string => normalizeUrl(sitecoreEdgeUrl); | ||
|
|
||
| /** | ||
| * Generates a URL for accessing Sitecore Edge Platform Content using the provided endpoint and context ID. | ||
| * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform. Default is https://edge-platform.sitecorecloud.io | ||
| * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform (resolved at config level). Defaults to platform URL. | ||
| * @returns {string} The complete URL for accessing content through the Edge Platform. | ||
| * @public | ||
| */ | ||
| export const getEdgeProxyContentUrl = (sitecoreEdgeUrl = SITECORE_EDGE_URL_DEFAULT) => | ||
| `${normalizeUrl(sitecoreEdgeUrl)}/v1/content/api/graphql/v1`; | ||
| export const getEdgeProxyContentUrl = ( | ||
| sitecoreEdgeUrl: string = constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT | ||
| ) => `${getBaseEdgeUrl(sitecoreEdgeUrl)}/v1/content/api/graphql/v1`; | ||
|
MenKNas marked this conversation as resolved.
|
||
|
|
||
| /** | ||
| * Generates a URL for accessing Sitecore Edge Platform Forms using the provided form ID and context ID. | ||
| * @param {string} sitecoreEdgeContextId - The unique context id. | ||
| * @param {string} formId - The unique form id. | ||
| * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform. Default is https://edge-platform.sitecorecloud.io | ||
| * @param {string} [sitecoreEdgeUrl] - The base endpoint URL for the Edge Platform (resolved at config level). Defaults to platform URL. | ||
| * @returns {string} The complete URL for accessing forms through the Edge Platform. | ||
| * @internal | ||
| */ | ||
| export const getEdgeProxyFormsUrl = ( | ||
| sitecoreEdgeContextId: string, | ||
| formId: string, | ||
| sitecoreEdgeUrl = SITECORE_EDGE_URL_DEFAULT | ||
| sitecoreEdgeUrl: string = constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT | ||
| ) => | ||
| `${normalizeUrl( | ||
| sitecoreEdgeUrl | ||
| )}/v1/forms/publisher/${formId}?sitecoreContextId=${sitecoreEdgeContextId}`; | ||
| `${getBaseEdgeUrl(sitecoreEdgeUrl)}/v1/forms/publisher/${formId}?sitecoreContextId=${sitecoreEdgeContextId}`; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.