Skip to content

Fix staging vs production URL confusion — application.conf vs Application.kt default #5

@GavT

Description

@GavT

Summary

There is a conflict between two backend URLs:

  • backend/src/main/resources/application.conf sets baseUrl = "https://stg.fuel-finder.ics.gov.uk" (staging)
  • Application.kt defaults to the production URL "https://fuel-finder.service.gov.uk" if the config key is absent

This means the deployed backend may be hitting the staging UK Gov API depending on how the config file is packaged, serving stale or test data to real users.

What to change

  1. Decide on a single source of truth: use application.conf for all environments
  2. Create environment-specific config files:
    • application.conf — production (production URL)
    • application-dev.conf — development/staging URL
  3. Set KTOR_ENV=dev or equivalent in the dev deployment
  4. Add a startup log line confirming which URL is active:
    log.info("Fuel Finder baseUrl: $baseUrl")
  5. Rotate any credentials if staging/prod tokens have been mixed

Workstream: WS1 Phase 1A

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Pre-launch must-have — should be fixed before any public trafficWS1-auditWorkstream 1 – Code AuditblockerMust fix before any release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions