personium / personium-core

Core module of Personium
https://personium.io
Apache License 2.0
88 stars 16 forks source link

box which schema is set does not return BASIC `WWW-Authenticate` header. #616

Closed yoh1496 closed 2 years ago

yoh1496 commented 3 years ago

In case I send HTTP GET request to box URL which schema URL is set, its response differs from one which schema URL is not set.

Description

Examples are below.

HTTP GET to box which is not set schema.

curl https://user.pds.example.com/articles -i
HTTP/1.1 401
Date: Thu, 02 Sep 2021 05:50:39 GMT
Content-Type: application/json
Content-Length: 82
Connection: keep-alive
WWW-Authenticate: Bearer realm="https://user.pds.example.com/"
WWW-Authenticate: Basic realm="https://user.pds.example.com/"
X-Personium-Version: 1.7.22
Server: Personium

HTTP GET to box which is set shema.

$ curl https://user.pds.example.com/hogehoge -i
HTTP/1.1 401
Date: Thu, 02 Sep 2021 05:50:32 GMT
Content-Type: application/json
Content-Length: 82
Connection: keep-alive
WWW-Authenticate: Bearer realm="https://user.pds.example.com/"
X-Personium-Version: 1.7.22
Server: Personium