Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

something went wrong while being behind Apache reverse proxy #61

Open
@tassoman

Description

While loading the web interface I got a 404 error "something went wrong" because browser can't load /api/settings neither /api/agent resources.

Settings are missing and Agents can't be loaded because resorces are served at: /nlp/api/settings and /nlp/api/agent

File swagger2.json is correctly loaded from: /nlp/swagger2.json

Steps to reproduce the behavior:

  1. Configure ssl with self-signed certs
  2. Configure apache to reverse proxy /nlp/ url
ProxyRequests Off
ProxyPass /nlp/ http://localhost:3010/
ProxyPassReverse /nlp/ http://localhost:3010/
<Location /nlp/>
        ProxyPassReverse /
        ProxyHTMLEnable On
        ProxyHTMLURLMap http://localhost:3010/ /nlp/
        ProxyHTMLURLMap / /nlp/
        RequestHeader unset Accept-Encoding
</Location>
  1. Configure client/.env like this
# ENV to generate public
# npm run build
SETTINGS_URL=https://remote.host/nlp
API_URL=https://remote.host/nlp
PUBLIC_PATH_PREFIX=.
  1. Open web interface and browser console
  2. See error

Mixed Content: The page at 'https://remote.host/nlp/api' was loaded over HTTPS, but requested an insecure resource 'http://remote.host/api/settings'. This request has been blocked; the content must be served over HTTPS.

I expected the interface were looking for /nlp/api/settings and /nlp/api/agent resources, where resource really are. Looks like SETTINGS_URL and API_URL are ignored.

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