• Resolved Pratham

    (@pratham2003)


    Hi

    I get a 404 error from TypeSense server API.
    https://example.com/cms-search:443/collections/stock/documents/search?q=test&query_by=post_title&per_page=5&x-typesense-api-key=REDACTED

    The problem looks like the :443 which is in the wrong place.

    My TypeSense server is behind a reverse proxy on https://example.com/cms-search

    I had to modify the following code to make it work.

    BACKEND includes/Main/TypesenseAPI.php

    Search for:
    ( $settings['protocol'] . $settings['node'] . ':' . $settings['port'] . '/' ?? '' )
    Replace with
    ( $settings['protocol'] . $settings['node'] . '/' ?? '' );

    FRONTEND assets/frontend/autocomplete.js

    Search for .concat(e.host,":").concat(e.port)
    Replace with .concat(e.host)

Viewing 1 replies (of 1 total)
  • Plugin Author CodeManas

    (@codemanas)

    Hello @pratham2003 ,

    Glad that you are able to resolve this on your own.

    We are looking into the issue and trying to find the best way to cooperate this issue in our plugin so that it doesn’t affect the server’s without reverse proxy.

    For any other users with the same issue, we would like you to follow the above solution mentioned. Once we fix it and in-cooperate in our plugin we will notify you of this.

    Regards,
    Codemanas

Viewing 1 replies (of 1 total)
  • The topic ‘Typesense API 404’ is closed to new replies.