Skip to content

docs: Provide example curl requests to CODE/PROD - #16377

Closed
akash1810 wants to merge 1 commit into
mainfrom
akash1810-patch-3
Closed

akash1810 wants to merge 1 commit into
mainfrom
akash1810-patch-3

Conversation

@akash1810

Copy link
Copy Markdown
Member

What does this change?

Follows #16217 to offer a curl example as the CORS configuration prevents us from making fetch calls in the browser.

@akash1810 akash1810 added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Jul 14, 2026
@akash1810
akash1810 force-pushed the akash1810-patch-3 branch from 7d9ce4f to cf14f3b Compare July 14, 2026 12:40

It is worth mentioning the CORS configuration of DCR in CODE/PROD limits what can be done in the browser; `curl` might be better for your use-case.

For example, to interact with a `POST` endpoint, first connect to the SOCKS proxy instance with [guardian/ssm-scala](https://github.com/guardian/ssm-scala):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DevX/Security team are actively deprecating this tol as we speak. Can we document the native AWS SSM version of this instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document the native AWS SSM version of this instead?

Sure! Does this already exist as part of the deprecation plan?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this needs to be blocking?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is simply not to add ssm-scala to the document when you can do the task with aws cli

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

"This PR is stale because it has been open 30 days with no activity. Unless a comment is added or the “stale” label removed, this will be closed in 3 days"

@github-actions github-actions Bot added the Stale label Aug 22, 2026
The CORS configuration prevents us from making `fetch` calls in the browser. Document the `curl` alternative.
@github-actions

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:db40bb93de14e248259494ac5bd3439d38dbe20589286ce28996b821178931c9

🐛 Run the image locally

The following can be used to run the image locally:

# Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:db40bb93de14e248259494ac5bd3439d38dbe20589286ce28996b821178931c9"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-akash1810-patch-3"

# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-30286"

# Refer to image via the GitHub commit SHA tag
# IMAGE_IDENTIFIER=":sha-c743451e97cbebae47aa516879c02d4d093c63c8"

# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"

IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/deployTools --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering${IMAGE_IDENTIFIER}"

# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY

# Pull the image
docker pull $IMAGE

# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGE

From guardian/actions-publish-image.

@github-actions

Copy link
Copy Markdown

"This PR is stale because it has been open 30 days with no activity. Unless a comment is added or the “stale” label removed, this will be closed in 3 days"

@github-actions github-actions Bot added the Stale label Sep 24, 2026
@github-actions

Copy link
Copy Markdown

This PR was closed because it has been stalled for 3 days with no activity.

@github-actions github-actions Bot closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants