Skip to content

Anonymous users cannot fetch agent avatar #14399

Description

@nickthecook

I have configured an Agent in Onyx with a custom avatar. I've also set up anonymous chat.

Users who are not logged in can chat with the agent (expected), but they can't see the agent's avatar - it looks like a broken image in the browser.

Here's a curl command reproducing the issue:

$ curl 'https://example.com/api/persona/2/avatar' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:154.0) Gecko/20100101 Firefox/154.0' \
  -H 'Accept: image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5' \
  -H 'Accept-Language: en-CA,en-US;q=0.9,en;q=0.8,fr-CA;q=0.7,fr;q=0.6' \
  -H 'Accept-Encoding: gzip, deflate, br, zstd' \
  -H 'Referer: https://example.com/app' \
  -H 'Connection: keep-alive' \
  -H 'Sec-Fetch-Dest: image' \
  -H 'Sec-Fetch-Mode: no-cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Priority: u=5, i' \
  -H 'Pragma: no-cache' \
  -H 'Cache-Control: no-cache'
{"detail":"Access denied. User is not authenticated."}

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions