gentle-bird-90474
06/25/2022, 6:21 AMcurl
requests (to Oathkeeper reverse proxying the API server), it just works fine (i.e. user is correctly identified from session_cookie
). However, as soon as our browser application does the same, Oathkeeper logs show subject=
(empty) and consequently the application receives an anonymous user. I’ve tracked down the issue and it seems to be related to 'Accept-Encoding: gzip, deflate, br'
header. Using curl
, if I omit the header, the request works, if I include it, the request “fails” (empty subject).
I’ve seen earlier discussions with @damp-sunset-69236 (e.g. https://ory-community.slack.com/archives/C01340V8KSM/p1650350811248739?thread_ts=1650167442.218979&cid=C01340V8KSM) which show that there seems to be an issue with gzip compression. I couldn’t find an issue in GitLabs issue tracker though, so I’m not sure what’s the state of the issue and if it’s really what’s causing my problems.
Also, got any idea for a workaround to this?gentle-bird-90474
06/25/2022, 6:41 AMaccept-encoding
header / setting it to an empty value in our application requests (as a temporary workaround). However, according to fetch API docs accept-encoding
is a forbidden header that can not be programmatically overridden via the API, see
• https://developer.mozilla.org/en-US/docs/Web/API/fetch
• https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_namehigh-optician-2097
gentle-bird-90474
06/25/2022, 1:57 PMdamp-sunset-69236
06/27/2022, 6:09 AMadditional_headers
feature of cookie_session authenticator. You can set accept-encoding: identity
to ignore gzip requests sent to Ory cloud.
However, forward_http_headers
feature will be released soon and allows you to specify headers that needed to be forwarded to the upstreamgentle-bird-90474
06/27/2022, 7:42 AMadditional_headers
feature also working for the bearer_token
authenticator? We have both Web and Mobile clients and both seem to suffer from the same issue.gentle-bird-90474
06/27/2022, 7:42 AMdamp-sunset-69236
06/27/2022, 8:41 AMbearer
and cookie_session
authenticators!high-optician-2097
gentle-bird-90474
06/27/2022, 9:25 AMhigh-optician-2097
high-optician-2097
gentle-bird-90474
06/27/2022, 12:03 PMWorks! Thanks guys 🙂(the workaround, didn’t check the release yet)