Hosthing early access · Explore the product. Public self-service deployment is not open yet. Stay in touch →
Skip to content
← All articles
Applications · 5 min read

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.

From repository to running applicationA diagram of source code being built and deployed into a live, verified running application on Hosthing.HRepoBuildLive

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/health
How your source becomes an imagePick a scenario — the builder is chosen automatically in this order.

Your repository contains a Dockerfile (or you point to one).

Builder selected: kaniko

  • Builds exactly what your Dockerfile describes
  • Daemonless build — runner isolation still needs verification
  • Outputs an image digest + SBOM + sanitized logs

Set the base directory and Dockerfile path for monorepos so the right context is built.

Verify 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.

Explore more guides →
Less managing. More making.

Give your next idea a place to grow.

Explore the product and tell us what you want to build. Public self-service deployment is not open yet.