All jobs / Full-stack developer / DevOps Basics
Full-stack developer interview question · 3–5 years
Every PR gets a preview URL. The default env still has the production API base.
What must a preview deploy not do?
The strongest answer
Point at production data or share an auth cookie with prod — preview UIs get a preview API (or a sealed dataset), not the live customer table
Why it works
Exactly. A Vercel-style preview with a leftover prod API URL is a data leak with a nice URL. Isolate data and cookies.
What a good answer covers
- Preview UI → preview (or sealed) API.
- No prod cookies on preview hosts.
- No prod PII in review apps.
- Auth stays on, even for design.
Answers that fall short
- Close, but not the strongest: Always hit production so the preview is 'real'
'Real' is how a review app deletes a real workspace. - Weak: Use the prod cookie domain so testers stay logged in
A shared cookie domain is how a preview XSS steals the production session. - Red flag: Disable auth on previews so design can click around
Open previews are indexed. Unauthenticated write APIs on them are public write APIs.
Who gets asked this
More DevOps Basics questions
- Prod: 'submit does nothing'. API dashboards look calm. The SPA error rate ticked up after a mixed deploy…
- API 5xx is 0.1%. Users still report 'save failed' because the SPA cannot reach a new path. Which errors go in…
- Platform wants daily UI deploys and weekly API deploys from the same repo. When may UI and API ship on…
- What would you set up so that the next one does not?
- Someone wants to put the API URL and the database password in `.env` for Vite. What can go in the frontend…
- A user says 'save failed'. You have UI logs and API logs and no join. How do you trace one click?
- You are deploying a SPA and its API for the first time on the same domain. How do you host them?
- How do you make it smaller, and what should not be in it at all?