Skip to content

Commit

Permalink
Merge pull request #27481 from guardian/document-how-to-point-to-CODE…
Browse files Browse the repository at this point in the history
…-CAPI

Document how to point to CODE CAPI
  • Loading branch information
emdash-ie authored Sep 18, 2024
2 parents f0b1ae1 + 0da994f commit 68f8a57
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/03-dev-howtos/24-pointing-to-CODE-CAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Pointing to CODE CAPI

It can be useful when running frontend locally to point it to CODE CAPI. The easiest way to do this is probably to point it to the CODE deployment of [concierge](https://github.com/guardian/content-api/tree/main/concierge). (In PROD and CODE, frontend connects to CAPI through dedicated URLs that allow it to bypass [kong](https://github.com/guardian/content-api/blob/main/gateways/vigile/README.md), but those URLs are relatively locked down and hard to access from dev computers. Concierge requests go through Kong and so are accessible from the public internet but restricted using API keys.)

To do this, follow the instructions in [14-override-default-configuration](./14-override-default-configuration.md), setting `content.api.host` to the url for concierge-CODE (currently `https://content.code.dev-guardianapis.com`), and `content.api.key` to a valid internal-tier key for concierge-CODE.

If you have access to [bonobo-CODE](https://bonobo-code.capi.gutools.co.uk/), you can create yourself a key there. If not, send Content Pipeline a message and they can create a key for you.

To give a complete example, here’s a redacted version of my `~/.gu/frontend.conf` from the last time I did this:

```conf
devOverrides {
content.api.host="https://content.code.dev-guardianapis.com"
content.api.key="REDACTED"
}
```
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
- [Testing Reader Revenue Components](03-dev-howtos/21-test-reader-revenue-components.md)
- [Access Preview Locally](03-dev-howtos/22-access-preview-locally.md)
- [Sport Tournaments](03-dev-howtos/23-sport-tournaments.md)
- [Pointing to CODE CAPI](03-dev-howtos/24-pointing-to-CODE-CAPI.md)

## [Quality](04-quality/)
- [Browsers support](04-quality/01-browser-support.md)
Expand Down

0 comments on commit 68f8a57

Please sign in to comment.