madec-project / ezvis

A dashboard to visualize a synthesis on a structured corpus, using several charts (pies, histograms, ...)
https://ezvis.readthedocs.org/
17 stars 5 forks source link

local:/// queries in corpusFields don't work in ezmaster v3.5.3 #92

Closed parmentf closed 7 years ago

parmentf commented 7 years ago

corpusFields in ezVis instances (with access) working in old ezmaster (without docker) do not work in ezmaster 3.5.3 (using docker).

Problem: when access block is present, corpusFields don't work:

    "$dates": {
      "default": 0,
      "$?": "local:///compute.json?operator=distinct&field=dateSansTiret",
      "parseJSON": true,
      "select": ".data ._id",
      "foreach": {
        "cast": "number"
      }
    }

Error:

Files and Database are synchronised. (333 saved documents)
::ffff:127.0.0.1 - - [16/Feb/2017:14:45:46 +0000] "GET /compute.json?operator=distinct&field=dateSansTiret HTTP/1.1" 401 12 "-" "-"
HTTP Error 401

The local: protocol does not work (maybe due to docker's network configuration, in ezmaster).

parmentf commented 7 years ago

See Access documentation warning.

The code is in basicAuth middleware and uses req.ip (which value should be 127.0.0.1 to bypass authentication).

parmentf commented 7 years ago

The req.ip was ::ffff:127.0.0.1, and not 127.0.0.1.