Setup Authorization for Searxng is terrible. #4978

Closed
opened 2026-02-21 18:08:51 -05:00 by yindo · 2 comments
Owner

Originally created by @iplayfast on GitHub (Aug 9, 2024).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.15

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Try to use the tool searxng

✔️ Expected Behavior

text prompt asking for the url to access it. (Authorisation is not part of it).
text input that can be typed into with out it being hidden.
When an error occurs the error remains in a second block under the text input.

Actual Behavior

Says "To Authorise" when is should be "To configure"
When going it the button
It gives the title "SearXNG base URL" which is fine, but then the input is hidden as though it were a password. This is very frustrating because they url is easily mistyped, and if you can't see what you are doing you don't know if the resulting error is from what you typed or something else.
Any error reported shows for half a second, barely giving time to read it, then it disappears. It should be put in the display without disappearing.

Originally created by @iplayfast on GitHub (Aug 9, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.15 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Try to use the tool searxng ### ✔️ Expected Behavior text prompt asking for the url to access it. (Authorisation is not part of it). text input that can be typed into with out it being hidden. When an error occurs the error remains in a second block under the text input. ### ❌ Actual Behavior Says "To Authorise" when is should be "To configure" When going it the button It gives the title "SearXNG base URL" which is fine, but then the input is hidden as though it were a password. This is very frustrating because they url is easily mistyped, and if you can't see what you are doing you don't know if the resulting error is from what you typed or something else. Any error reported shows for half a second, barely giving time to read it, then it disappears. It should be put in the display without disappearing.
yindo added the 🐞 bug label 2026-02-21 18:08:51 -05:00
yindo closed this issue 2026-02-21 18:08:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 9, 2024):

To address the issues with setting up authorization for SearXNG in Dify version 0.6.15, self-hosted with Docker, follow these steps:

  1. Change "To Authorise" to "To configure":
    Update the translation key for "To Authorise" to "To configure" in the translation file. Locate the key in the web/i18n/languages.json file and update it accordingly.

  2. Make the "SearXNG base URL" input field visible:
    Modify the configuration for the input field in the api/core/tools/provider/builtin/searxng/searxng.yaml file:

    credentials_for_provider:
      searxng_base_url:
        type: text-input  # Change from secret-input to text-input
        required: true
        label:
          en_US: SearXNG base URL
          zh_Hans: SearXNG base URL
        help:
          en_US: Please input your SearXNG base URL
          zh_Hans: 请输入您的 SearXNG base URL
        placeholder:
          en_US: Please input your SearXNG base URL
          zh_Hans: 请输入您的 SearXNG base URL
        url: https://docs.dify.ai/tutorials/tool-configuration/searxng
    
  3. Ensure error messages remain visible for a longer duration:
    Adjust the display duration of error messages in the web/public/vs/editor/editor.main.js file. Increase the timeout value in the setTimeout function within the fadeOut method of the MessageController class:

    class f {
        static fadeOut(d) {
            const s = () => {
                d.dispose();
                clearTimeout(l);
                d.getDomNode().removeEventListener("animationend", s);
            };
            const l = setTimeout(s, 5000);  // Change 110 to 5000 for a 5-second duration
            d.getDomNode().addEventListener("animationend", s);
            d.getDomNode().classList.add("fadeOut");
            return { dispose: s };
        }
        // ... other methods
    }
    

By following these steps, you can ensure that the interface says "To configure" instead of "To Authorise," the input field for the "SearXNG base URL" is visible, and error messages remain visible for a longer duration [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 9, 2024): <!-- Answer --> To address the issues with setting up authorization for SearXNG in Dify version 0.6.15, self-hosted with Docker, follow these steps: 1. **Change "To Authorise" to "To configure"**: Update the translation key for "To Authorise" to "To configure" in the translation file. Locate the key in the `web/i18n/languages.json` file and update it accordingly. 2. **Make the "SearXNG base URL" input field visible**: Modify the configuration for the input field in the `api/core/tools/provider/builtin/searxng/searxng.yaml` file: ```yaml credentials_for_provider: searxng_base_url: type: text-input # Change from secret-input to text-input required: true label: en_US: SearXNG base URL zh_Hans: SearXNG base URL help: en_US: Please input your SearXNG base URL zh_Hans: 请输入您的 SearXNG base URL placeholder: en_US: Please input your SearXNG base URL zh_Hans: 请输入您的 SearXNG base URL url: https://docs.dify.ai/tutorials/tool-configuration/searxng ``` 3. **Ensure error messages remain visible for a longer duration**: Adjust the display duration of error messages in the `web/public/vs/editor/editor.main.js` file. Increase the timeout value in the `setTimeout` function within the `fadeOut` method of the `MessageController` class: ```js class f { static fadeOut(d) { const s = () => { d.dispose(); clearTimeout(l); d.getDomNode().removeEventListener("animationend", s); }; const l = setTimeout(s, 5000); // Change 110 to 5000 for a 5-second duration d.getDomNode().addEventListener("animationend", s); d.getDomNode().classList.add("fadeOut"); return { dispose: s }; } // ... other methods } ``` By following these steps, you can ensure that the interface says "To configure" instead of "To Authorise," the input field for the "SearXNG base URL" is visible, and error messages remain visible for a longer duration <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/app/overview/customize/index.tsx)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/searxng/searxng.yaml)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/web/public/vs/editor/editor.main.js)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 9, 2024):

Sorry for the late response. I need to clarify several things

image
  • Are you able to access the searxng after running the docker command?
  • Have you check the settings.yml in the container which might has the line - json
image

Things I changed according to your requirements:

@crazywoola commented on GitHub (Aug 9, 2024): Sorry for the late response. I need to clarify several things <img width="806" alt="image" src="https://github.com/user-attachments/assets/819db31b-78b5-4f00-9e24-a5297cb99076"> - Are you able to access the searxng after running the docker command? - Have you check the settings.yml in the container which might has the line `- json` <img width="486" alt="image" src="https://github.com/user-attachments/assets/b9e8d52c-8b3a-4bca-9f19-3a578340cfa8"> Things I changed according to your requirements: - I changed the secret-input to text-input https://github.com/langgenius/dify/pull/7160 - I checked the settings.yml in container, if the `- json` is missing, it will have a 403 issue as you described in https://github.com/langgenius/dify/issues/6777
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4978