Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a configurable base URL in processWebRequests function #36

Open
coderabbitai bot opened this issue Jul 27, 2024 · 0 comments
Open

Use a configurable base URL in processWebRequests function #36

coderabbitai bot opened this issue Jul 27, 2024 · 0 comments
Assignees

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2024

Description

In the processWebRequests function, the base URL is currently hardcoded as "http://localhost". It is recommended to use a configurable base URL instead.

Suggested Solution

Replace the hardcoded base URL with a value from an environment variable, with a fallback to "http://localhost" if the environment variable is not set.

Example:

const baseUrl = process.env.BASE_URL || "http://localhost";
const { pathname, searchParams } = new URL(url, baseUrl);

References

Assignee

@drazisil

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

No branches or pull requests

1 participant