Exposure

Hardcoded URLs in the code

Move base URLs and callback URLs out of the code and into environment variables.

Why it matters

A localhost or staging URL in the code breaks production and can send users to the wrong environment.

One setting per environment avoids editing code for every deploy and prevents a test URL from going live.

How to fix it

  1. Search for http://, localhost, and staging domains in the code

  2. Move the base URL and callbacks to environment variables

  3. Set a different value for each environment

Prompt for an AI assistant

Copy the text below and paste it into an AI assistant.

You are the person improving this website. Check the item below and fix it if it applies to the site.

Item: Hardcoded URLs in the code
Summary: Move base URLs and callback URLs out of the code and into environment variables.
Steps:
1. Search for http://, localhost, and staging domains in the code
2. Move the base URL and callbacks to environment variables
3. Set a different value for each environment
References:
- The Twelve-Factor App: Config (https://12factor.net/config)

Constraints:
- Keep the existing design and tone of voice.
- Show the file or section you changed and the suggested final wording.
- Do not decide ambiguous points alone; give options and a recommendation.
- Do not change anything outside the listed item.

Related checks

References

Check your site now

Enter a URL and find what is missing before launch, for free.

Run audit