AI with reverse proxy | MDaemon Technologies, Ltd.

AI with reverse proxy


  • Hello,

    I use a reverse proxy (Nginx Proxy Manager) to access Mdaemon.
    But the AI does not work in this configuration.
    In direct connection to the Mdaemon server it works.

    Is there a parameter to set for using AI with proxy?

    Thanks



  • The AI communication is using winhttp for the HTTP communications and it is attempting to connect to AI.MDaemon.com.  If you open a browser on the MDaemon server, with the reverse proxy enabled, are you able to browse to https://ai.mdaemon.com/proxy?

    If the browser is working and winhttp is not, check the proxy settinsg for winhttp by opening an elevated command prompt and running the following command:

    netsh winhttp show proxy  

    If no proxy server is configured, you should get something like this:

    C:\>netsh winhttp show proxy

    Current WinHTTP proxy settings:

        Direct access (no proxy server).

    You can configure a proxy server directly for winhttp by running the following command:

    netsh winhttp set proxy :


  • hello and thank you for your feedback,

    https://ai.mdaemon.com/proxy works in all cases and setting up a proxy on mdaemon does not solve this problem !
    On the Mdaemon server if I connect to it everything works.
    On an internal computer if I connect to Mdaemon it works
    If an external station connects via the transparent reverse proxy to Mdaemon everything works except the AI.

    The error message displayed is :

    An error occurred:
    Oops! Something went wrong with the request. Please try again later.


  • Please check the webmail log on MDaemon server for errors during the AI processing. You should  be able to find entries logged by searching for "OpenAI".

    A successful AI request will look like this:

    Mon 2023-12-04 07:04:14.994: [KA0JLK7CSY077] {bd9f9ae32f} BeginRequest WCAPI POST /WorldClientAPI/compose
    Mon 2023-12-04 07:04:14.997: [KA0JLK7CSY077] {bd9f9ae32f} OpenAI proofread request made by arron@test.com. (IP 10.1.1.1)
    Mon 2023-12-04 07:04:22.776: [KA0JLK7CSY077] {bd9f9ae32f} OpenAI proofread request by arron@test.com succeeded. (IP 10.1.1.1)
    Mon 2023-12-04 07:04:22.776: [KA0JLK7CSY077] {bd9f9ae32f} EndRequest WCAPI POST /WorldClientAPI/compose (Request Took: 7.783680 seconds)

    When you run netsh winhttp show proxy from an elevated command prompt, can you confirm that the correct proxy settings are returned?

     


  • Also, are there any errors in your proxy logs when the errors occur with the AI features?


  • Sorry, but using logs should always be the first idea.
    The problem is the connection between the reverve proxy and Mdaemon has been downgraded to http
    And the log gives the answer:
    WCAPI - This warning may be caused by the use of a proxy. Add this to MDaemon/WorldClient/Domains.ini [Default:Settings]: WorldClientAPI:AllowHttpsToHttpDowngrades=Yes
    After modification it works correctly..... Fabulous.
    Thank you so much.

  • Great!  I'm glad you were able to get it working!


Please login to reply this topic!