You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dotcom-rendering/docs/contributing/how-to.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,3 +49,13 @@ We currently use [SWR](https://swr.vercel.app/) to manage AJAX requests on the
49
49
client. Your starting point should be the [`useApi` hook](/dotcom-rendering/src/lib/useApi.ts),
50
50
which is DCR's wrapper around SWR's own hook. Because this hook requires
51
51
client-side React code, you will need to place your component in an `<Island>` wrapper.
52
+
53
+
## How can I interact with the API on CODE/PROD?
54
+
55
+
The DCR load balancers are configured to accept requests from within the VPC; they are not available on the public internet.
56
+
To make requests to the API from your local machine, use the [SOCKS proxy](https://github.com/guardian/platform/blob/main/cdk/lib/socks-proxy.ts):
57
+
58
+
1. Obtain AWS credentials via Janus, preferably using the minimal `socks-proxy` Developer Policy (`DeveloperPolicyGrants.frontendSocksProxy`)
59
+
2. Run the `browse-with-socks-proxy` script from the [`guardian/platform` repo](https://github.com/guardian/platform/blob/main/scripts/browse-with-socks-proxy):
60
+
This will start a new instance of the Chrome browser with a SOCKS proxy configured to route request via an EC2 instance in the VPC.
61
+
You can now browse the DCR API on CODE/PROD from this browser instance.
0 commit comments