Repository navigation
CCM-24047: added mTLS instructions for client callbacks - #1099
Conversation
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
Error in browser when running `make serve`:
```
Uncaught SyntaxError: Cannot use 'import.meta' outside a module
hot.js:35 [hot] hot reloading connected
(index):35 Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at (index):35:35
```
Cause:
make serve ran redocly preview-docs , whose generated HTML loaded
cdn.redocly.com/redoc/latest/... as a classic script. The current latest
bundle uses import.meta , which only parses inside a module — hence the
SyntaxError, window.Redoc undefined, .init failure, blank page.
Fix options considered:
1. patch-package — pin preview server to redoc/v2.5.0 . Durable (survives
reinstall), keeps live-reload for serve + serve-watch . Cost: a committed
patch file + postinstall hook.
2. Switch serve to build-docs — redocly build-docs already pins the
working redoc/v2.5.0 . Generate a static HTML and serve it. No node_modules
changes at all. Cost: loses redocly's websocket live-reload (browser needs
manual refresh; serve-watch would just rebuild the file).
3. Upgrade @redocly/cli 1.34 → 2.x — as is fixed upstream, but it's a major
bump. Cost: also loses redocly's websocket live-reload. But, it enables us
to pin a working version, so can avoid this happenning again.
Fix (option 3):
- Bump @redocly/cli to 2.72.1. The `preview-docs` command was removed in
2.x, so the serving approach had to change regardless.
- Add a `build-docs` script using `redocly build-docs --inlineBundle`,
producing a self-contained build/index.html with redoc and the spec
inlined (loaded as a module), removing the broken-CDN dependency.
- Point `serve` at the static build/ directory via python http.server.
- Add browser-sync (serve-live) and rewire `make serve-watch` to rebuild
on spec edits (nodemon) and auto-reload the browser, restoring true
live reload that preview-docs previously provided.
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: CCM-24047 |
Summary
Added mTLS instructions for client callbacks
https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/1213034622/REFCOM-2025-085+%F0%9F%9F%A2+Improved+Client+Callbacks
https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/1373767319/REFCOM-2026-039+%F0%9F%9F%A2+Callbacks+mTLS+Certificate+Approach
Reviews Required
Checklist