Skip to content

add host name config#5

Merged
TimilsinaBimal merged 1 commit intomainfrom
dev
Nov 22, 2025
Merged

add host name config#5
TimilsinaBimal merged 1 commit intomainfrom
dev

Conversation

@TimilsinaBimal
Copy link
Copy Markdown
Owner

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
watchly Ready Ready Preview Comment Nov 22, 2025 0:25am

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @TimilsinaBimal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines how the application determines its base URL by introducing a configurable HOST_NAME setting. This change moves away from dynamically inferring the host from request headers, ensuring a more consistent and predictable base URL across the application's API endpoints. This is particularly useful in environments behind proxies or load balancers where request headers might not accurately reflect the external host.

Highlights

  • New Configuration: Introduced a new HOST_NAME configuration setting to explicitly define the application's base URL.
  • Centralized Host Name Usage: Modified API endpoints (streams.py and tokens.py) to use the new settings.HOST_NAME instead of dynamically determining the base URL from incoming requests.
  • Removed Dynamic Base URL Logic: Eliminated the _preferred_base_url helper function in app/api/endpoints/tokens.py as its functionality is now replaced by the static HOST_NAME setting.
  • Environment Variable Example: Added HOST_NAME to the .env.example file, providing a clear example for setting this configuration.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@TimilsinaBimal TimilsinaBimal merged commit 7641ab4 into main Nov 22, 2025
4 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a HOST_NAME configuration setting to use a static base URL, replacing dynamic URL detection. This simplifies the logic and improves consistency across the application. My main feedback is on the new HOST_NAME setting in app/core/config.py, which has a hardcoded default value. This could lead to misconfigurations in different environments. I've suggested making it a required environment variable by removing the default value for better robustness.

Comment thread app/core/config.py
AUTO_UPDATE_CATALOGS: bool = True
CATALOG_REFRESH_INTERVAL_SECONDS: int = 21600 # 6 hours
APP_ENV: Literal["development", "production"] = "development"
HOST_NAME: str = "https://1ccea4301587-watchly.baby-beamup.club"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Hardcoding a specific public URL as the default value for HOST_NAME is not recommended. This can lead to misconfigurations where development or other environments inadvertently use this URL. It's better to make this a required setting by removing the default value. This will force the value to be explicitly set in the environment, preventing accidental use of a wrong hostname. The .env.example file already guides the user to set this value.

Suggested change
HOST_NAME: str = "https://1ccea4301587-watchly.baby-beamup.club"
HOST_NAME: str

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant