Skip to content

Commit

Permalink
Merge pull request #80 from HubSpot/bmatto/update-docs-around-private…
Browse files Browse the repository at this point in the history
…-proxy

Update docs for private proxying with email context
  • Loading branch information
bmatto authored Aug 7, 2024
2 parents 5f35c23 + 607de5d commit 6147cea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/reference/cms-dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Making use of the CMS React local dev with proxied pages is powerful. It allows

Visit a private page and login with the configured method. Once authenticated Once there add `hslocal.net:3000` or `localhost:3000` to your root domain just as you would with proxying a public page. This will allow you to develop your React modules locally in the context of an authenticated live page.

When proxying a private page, if you provide an email parameter e.g. `https://mydomain.hslocal.net:3000/[email protected]` that email's user will be used for the `request_contact` HubL variable. This can be passed to React with the [`hublDataTemplate`](./js-modules#hublDataTemplate) feature.

### Proxied Preview

Visit the page as a "preview". You can do this from the page editor by clicking the "Preview" button and then "Open in a new tab". Once there add `hslocal.net:3000` or `localhost:3000` to your root domain. This will allow you to do local development on a private pages. Further if you pass an `email` param it will use the associated contact as context for viewing the page. Your URL in this case wil look like `http://my-domain.com.localhost:3000/private-page-path?hs_preview=[preview_key]&[email protected]`.
Expand Down

0 comments on commit 6147cea

Please sign in to comment.