Skip to content

Refactor: Centralize and Secure Server Configuration Using Environment Variables #1087

@saifrk

Description

@saifrk

Description

This task aims to refactor the server configurations by moving them into a separate configuration file and fetching base_url from environment variables. Currently, the base_url for different servers (dev, test, production, LRM, XLI, etc.) is hardcoded within the server configurations, posing a security risk and lacking flexibility. The proposed change will improve security, maintainability, and flexibility by fetching the base_url from environment variables.

Implementation Considerations

  • Extract all server configuration details into a standalone configuration file (server_configs.py) in the Django project.
    -Define environment variable for the base_urls and fetch base_url from these environment variables rather than relying on hardcoded values

Deliverable

-A server_configs.py that centralizes all server configurations and imports them as needed across the project
-Refactor the existing codebase to use the centralized server configurations, ensuring that base_url is fetched from environment variables

Dependencies

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions