Skip to content

Implement BASE_PATH environment variable#890

Open
ItsSpaceMan wants to merge 6 commits intothedevs-network:mainfrom
singlewire:basepath
Open

Implement BASE_PATH environment variable#890
ItsSpaceMan wants to merge 6 commits intothedevs-network:mainfrom
singlewire:basepath

Conversation

@ItsSpaceMan
Copy link
Copy Markdown

PR to implement base path, such that the service can run on /kutt, /url-shortener, or any other base path specified. Ran through the application several times with BASE_PATH omitted and set, and everything is looking good.

@ItsSpaceMan
Copy link
Copy Markdown
Author

@poeti8 are you able to take a look at this PR?

@poeti8
Copy link
Copy Markdown
Member

poeti8 commented Apr 29, 2025

@ItsSpaceMan Yes

@browser-bug
Copy link
Copy Markdown

Is this getting any lights? I think it's a fairly important feature that would benefit lots of users. @poeti8

Copy link
Copy Markdown

@yq2028 yq2028 left a comment

Choose a reason for hiding this comment

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

in file : server/utils/utils.js , this snippet is wrong. it make the short link include the base_path no matter what the env.SHORT_URLS_INCLUDE_PATH is true or false.
if (linkDomain === env.DEFAULT_DOMAIN) {
path = env.BASE_PATH;

@ItsSpaceMan
Copy link
Copy Markdown
Author

in file : server/utils/utils.js , this snippet is wrong. it make the short link include the base_path no matter what the env.SHORT_URLS_INCLUDE_PATH is true or false. if (linkDomain === env.DEFAULT_DOMAIN) { path = env.BASE_PATH;

Good catch; cleaned up. Thanks @yq2028.

Added a new commit as well to fix up some main page logic (see 3710b71).

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.

5 participants