dev(apps): add configuration to not use app icon subdomain#2603
Merged
KernelDeimos merged 2 commits intomainfrom Mar 5, 2026
Merged
dev(apps): add configuration to not use app icon subdomain#2603KernelDeimos merged 2 commits intomainfrom
KernelDeimos merged 2 commits intomainfrom
Conversation
For some local configurations of Puter, such as using ngrok or a hosting service that has limited subdomains or limited subdomain depth, the static hosting subdomain for app icons is difficult to configure and may not be viable. Since this is only done so an external geo-replicated cache can be used, and it's always possible for Puter's backend to generate an app icon, it should be possible to configure Puter's backend to use icons from a URL hosted on the default subdomain. Add a configuration parameter to the service "app-icon" called "no_subdomain" which prevents Puter's backend from sending puter-icons subdomain URLs or redirecting to them. Also perform some small cleanup changes to make the existing code easier to understand, including: - rename `buildAppIconUrl` to `buildAppIconSubdomainUrl` to make it clear which of the two types of icon URLs are being generated. - replace `withAppIconUrl` with `get_app_icon_url` so it is possible to get an icon URL without mutating an app object. - make the `get_taskbar_items` helper use the same code for getting app icons as the `get_apps` helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For some local configurations of Puter, such as using ngrok or a hosting service that has limited subdomains or limited subdomain depth, the static hosting subdomain for app icons is difficult to configure and may not be viable. Since this is only done so an external geo-replicated cache can be used, and it's always possible for Puter's backend to generate an app icon, it should be possible to configure Puter's backend to use icons from a URL hosted on the default subdomain.
Add a configuration parameter to the service "app-icon" called "no_subdomain" which prevents Puter's backend from sending puter-icons subdomain URLs or redirecting to them.
Also perform some small cleanup changes to make the existing code easier to understand, including:
buildAppIconUrltobuildAppIconSubdomainUrlto make it clear which of the two types of icon URLs are being generated.withAppIconUrlwithget_app_icon_urlso it is possible to get an icon URL without mutating an app object.get_taskbar_itemshelper use the same code for getting app icons as theget_appshelper.