Skip to content

Favicon uses the original page URL to resolve relative icon links after a redirect #13985

Closed

Description

@Indra55

👟 Reproduction steps

  1. On a public test host, make /start redirect to /blog/page.
  2. Serve /blog/page with <link rel="icon" href="images/icon.ico">.
  3. Serve different icons at /images/icon.ico and /blog/images/icon.ico.
  4. Request /v1/avatars/favicon with url set to https://<test-host>/start.

👍 Expected behavior

The endpoint returns the icon from /blog/images/icon.ico, resolving the relative link against the page URL reached after the redirect.

👎 Actual Behavior

It follows the redirect but resolves the icon link against the original /start URL, so it returns /images/icon.ico instead.

Cause: safeFetch() loses the final URL after redirects (Get.php:278), and icon links and the /favicon.ico fallback are resolved against the original $url (Get.php:115, 152-154).

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Appwrite self-hosted build from upstream main. No SDK used. Reproduced with controlled redirect and favicon responses.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added theissue type on Sep 29, 2026
  2. added
    product / avatars
    product / self-hosted
    product / storage
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / avatarsproduct / self-hostedproduct / storage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions