Skip to content

Add staging environment identification headers#326

Open
aram356 wants to merge 2 commits intomainfrom
feat/staging-env-headers
Open

Add staging environment identification headers#326
aram356 wants to merge 2 commits intomainfrom
feat/staging-env-headers

Conversation

@aram356
Copy link
Collaborator

@aram356 aram356 commented Feb 18, 2026

Summary

  • Adds X-TS-Version header (from FASTLY_SERVICE_VERSION) to every response
  • Adds X-TS-Env: staging header when FASTLY_IS_STAGING=1
  • Uses constants defined in constants.rs for header names
  • Enables instant staging vs production verification via curl or browser DevTools

Test plan

  • Deploy a version to staging and verify X-TS-Env: staging header is present
  • Verify production responses have X-TS-Version but no X-TS-Env
  • Confirm via curl -sI <url> | grep X-TS

Closes #325

@aram356 aram356 self-assigned this Feb 18, 2026
@aram356 aram356 force-pushed the feat/staging-env-headers branch from 9fa7ac6 to 4c5ee04 Compare February 18, 2026 21:36
…tion

Expose FASTLY_SERVICE_VERSION as X-TS-Version on every response, and set
X-TS-Env: staging when FASTLY_IS_STAGING=1. This makes it trivial to tell
staging from production via curl or browser DevTools.

Adds constants for both the Fastly env vars and the header names.

Closes #325

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aram356 aram356 force-pushed the feat/staging-env-headers branch from 4c5ee04 to 89a9e79 Compare February 18, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add response headers to identify staging vs production environment

1 participant

Comments