Skip to content

dev(apps): add configuration to not use app icon subdomain#2603

Merged
KernelDeimos merged 2 commits intomainfrom
eric/26344_app-icon-config
Mar 5, 2026
Merged

dev(apps): add configuration to not use app icon subdomain#2603
KernelDeimos merged 2 commits intomainfrom
eric/26344_app-icon-config

Conversation

@KernelDeimos
Copy link
Copy Markdown
Contributor

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.

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.
@KernelDeimos KernelDeimos merged commit 0864b9e into main Mar 5, 2026
4 checks passed
@jelveh jelveh deleted the eric/26344_app-icon-config branch May 1, 2026 20:00
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