Help to understand issue 403, message='Forbidden'
tomamplius opened this issue · 1 comments
tomamplius commented
with V2.6.7 i have this error on Homeassitant
2023-04-27T23:49:22.483782+02:00 homeassistant hass[32146]: 2023-04-27 23:49:22.482 ERROR (MainThread) [custom_components.babybuddy] Authentication failed while fetching babybuddy data: 403, message='Forbidden', url=URL('https://baby.domaine.com/api/children/')
but on same host it's work with curl
curl -X GET 'https://baby.domaine.com/api/children/' -H 'Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
{"count":1,"next":null,"previous":null,"results":[{"id":1,"first_name":"n v a","last_name":"l","birth_date":"2023-03-13","slug":"n-v-a-l","picture":null}]}
can you help me to understand, my issue?
tomamplius commented
I have add bellow parameter on babybuddy configuration
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")