Connect an external frontend to your API: a verification checklist.
Check HTTPS, CORS, authentication and authorization before connecting a separately hosted frontend to a deployed API.
Establish a reachable HTTPS endpoint
Replace the example hostname below with your verified application endpoint. Use an actual health route implemented by your application. Expect a successful response and a valid certificate; do not bypass certificate checks with curl -k. A platform deployment status alone does not prove the application journey works.
curl --fail --show-error --max-time 15 https://api.example.com/healthVerify the browser preflight
Configure your API to allow the exact frontend origin, required methods and headers. The OPTIONS response should allow that origin and the requested method/header. Repeat with an unapproved origin and verify it is not allowed. A successful preflight does not prove that the subsequent API request is authorized.
curl --include --request OPTIONS https://api.example.com/messages \
--header 'Origin: https://frontend.example.com' \
--header 'Access-Control-Request-Method: POST' \
--header 'Access-Control-Request-Headers: authorization,content-type'Do not use a wildcard origin with credentialed browser requests. Cookie authentication also needs deliberate SameSite and CSRF protection.
Test access controls independently
Call a protected route without a session or token and expect denial. Test expired credentials and a different tenant attempting to read another tenant’s resource. Authorization belongs in the API for every operation; hiding a frontend button is not access control. Rate limits, input validation and abuse controls also require application-level verification.
Keep the database behind the API
The browser calls the API, not the database. Deliver credentials only to the backend workload through supported secret or binding mechanisms. Prefer private database connectivity and verify TLS where required. Review application logs for accidental token or credential exposure.
Reference and production gate
The browser protocol is documented in the MDN CORS guide: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS. Confirm your framework’s current authentication and CSRF documentation. This checklist has not been executed against your workload: record real results, denial cases and recovery behavior before production.