aptly-web-ui icon indicating copy to clipboard operation
aptly-web-ui copied to clipboard

send authentication headers when calling aptly API

Open erdeerdeerde opened this issue 8 years ago • 3 comments

Ive noticed that when the UI calls eg. /api/repos the authentication header is not sent, thus i can not access the API.

erdeerdeerde avatar Aug 25 '17 08:08 erdeerdeerde

Yep, looks like I forgot the {credentials: 'same-origin'} option in fetch() calls. Not using Auth myself, thanks for reporting.

sdumetz avatar Aug 28 '17 07:08 sdumetz

Encountering the same error, API is not usable with authentication. Any plans to fix this? :) thanks

benelgiac avatar Jul 05 '18 10:07 benelgiac

By the way, I have never touched a line of js code, but based on your hint, the attached stupid patch made the trick for me and it now everything seems working with authentication.

stupid_patch.diff.txt

benelgiac avatar Jul 05 '18 11:07 benelgiac