[MacOS] Enchanted app compatibility workaround for "HEAD /ollama/ HTTP/1.1" 405 Method Not Allowed #569

Closed
opened 2025-11-11 14:26:17 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @rsik on GitHub (Apr 1, 2024).

Bug Report

https://github.com/AugustDev/enchanted/issues/64

Description

The Enchanted macos app is not seemingly compatible with open-webui, this is a workaround and maybe insight to a bug. I am not sure if this is the only app with this issue, but I wanted to take advantage of the easy auth with JWT. I serve multiple vlans and family members and servers, so this was a win for me; maybe it'll help someone.

I also have a non-typical set up because of a mac studio and docker cannot reach GPU on Apple Silicon. So this is the tldr setup:

User > Enchanted (or app) > router: HAProxy (multiple vlans) > caddy + open-webui/ollama docker > mac studio: caddy + ollama (* origins)

Despite the above, I have tried it directly to open-webui without HAProxy or base Caddyfile and error without workaround. This is the Caddyfile for caddy + open-webui/ollama docker part:

:443 {
    tls /etc/caddy/cert.pem /etc/caddy/key.pem

    # Rewrite / path HEAD requests to /ollama path HEAD requests
    @head {
        method HEAD
    }
    rewrite @head /ollama

    # Reverse proxy all other requests to the Docker container
    reverse_proxy open-webui:8080
}

I am not sure of the security implications of this yet, but wanted to note this finally worked after quite a bit of troubleshooting.

Bug Summary:
Enchanted requests "GET /ollama/api/tags HTTP/1.1" and follows up with a HEAD /ollama request to the base ollama API url, in this case https://site.tld/ollama but greeted with "HEAD /ollama/ HTTP/1.1" 405 Method Not Allowed and Enchanted cannot "reach" the server.

Steps to Reproduce:

  1. Set Enchanted base Ollama URL and token to open-webui/ollama and the token
  2. docker compose logs and see error

Expected Behavior:
Send request and "HEAD /ollama HTTP/1.1" 200 OK

Actual Behavior:
Send request and "HEAD /ollama/ HTTP/1.1" 405 Method Not Allowed

Environment

  • Operating System: MacOS Sonoma 14.2.1

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
    ^relevant ones posted above

Logs and Screenshots

Screenshot 2024-04-01 at 1 42 56 AM

Installation Method

Docker + separate ollama API

Additional Information

See description.

Originally created by @rsik on GitHub (Apr 1, 2024). # Bug Report https://github.com/AugustDev/enchanted/issues/64 ## Description The Enchanted macos app is not seemingly compatible with open-webui, this is a workaround and maybe insight to a bug. I am not sure if this is the only app with this issue, but I wanted to take advantage of the easy auth with JWT. I serve multiple vlans and family members and servers, so this was a win for me; maybe it'll help someone. I also have a non-typical set up because of a mac studio and docker cannot reach GPU on Apple Silicon. So this is the tldr setup: ``` User > Enchanted (or app) > router: HAProxy (multiple vlans) > caddy + open-webui/ollama docker > mac studio: caddy + ollama (* origins) ``` Despite the above, I have tried it directly to open-webui without HAProxy or base Caddyfile and error without workaround. This is the Caddyfile for `caddy + open-webui/ollama docker` part: ``` :443 { tls /etc/caddy/cert.pem /etc/caddy/key.pem # Rewrite / path HEAD requests to /ollama path HEAD requests @head { method HEAD } rewrite @head /ollama # Reverse proxy all other requests to the Docker container reverse_proxy open-webui:8080 } ``` I am not sure of the security implications of this yet, but wanted to note this finally worked after quite a bit of troubleshooting. **Bug Summary:** Enchanted requests `"GET /ollama/api/tags HTTP/1.1"` and follows up with a `HEAD /ollama` request to the base ollama API url, in this case `https://site.tld/ollama` but greeted with `"HEAD /ollama/ HTTP/1.1" 405 Method Not Allowed` and Enchanted cannot "reach" the server. **Steps to Reproduce:** 1. Set Enchanted base Ollama URL and token to open-webui/ollama and the token 2. docker compose logs and see error **Expected Behavior:** Send request and `"HEAD /ollama HTTP/1.1" 200 OK` **Actual Behavior:** Send request and `"HEAD /ollama/ HTTP/1.1" 405 Method Not Allowed` ## Environment - **Operating System:** MacOS Sonoma 14.2.1 ## Reproduction Details **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [X] I have included the Docker container logs. ^relevant ones posted above ## Logs and Screenshots <img width="869" alt="Screenshot 2024-04-01 at 1 42 56 AM" src="https://github.com/open-webui/open-webui/assets/26800931/4155805a-bc22-4bff-a778-f825e463aead"> ## Installation Method Docker + separate ollama API ## Additional Information See description.
Author
Owner

@tjbck commented on GitHub (Apr 2, 2024):

Just added /ollama route to our dev branch, let us know if that fixes the issue!

@tjbck commented on GitHub (Apr 2, 2024): Just added `/ollama` route to our dev branch, let us know if that fixes the issue!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#569