Unsupported Encoding \"br\ only in https

Not applicable

Hi, I'm trying to setup an API Proxie, then I encounter the encoding issue.

As mentioned, my API received this error only in https.

When access using http, it is fine.

I have tried setting the headers as follows, but still the same.

Can someone please enlighten me? Thanks in advance

<Header name="Accept-Encoding">gzip,deflate</Header>

Unsupported Encoding \"br\
Solved Solved
1 9 2,141
1 ACCEPTED SOLUTION

PS: Turns out my earlier answer didn't actually fixed it, rather adding this in the Pre-flow of my Proxy.

<AssignMessage async="false" continueOnError="false" enabled="true" name="AM-FixEncoding">
    <DisplayName>AM-FixEncoding</DisplayName>
    <Properties/>
    <Set>
        <Headers>
            <Header name="Accept-Encoding">gzip,deflate</Header>
        </Headers>
    </Set>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>

View solution in original post

9 REPLIES 9

rmishra
Participant V

Can you talk a little bit about your Apigee topology? On Prem? Cloud? Do you have a load balancer infront of Apigee Rouers? How is your request routed to Apigee?

When you trace your request, are you able to see your request in trace? (I am guessing "No")

It almost seems like a web server in your request path does not support Brotli(br) as an encoding format. If you are confident that your client (the request origin) is not appending "br", i would begin by checking the intermediary web servers and tracking down the server which throws this error.

As to your question about , http works but https doesn't. That's certainly possible if different schemes are configured to handle different encoding formats.

liorkarol
Participant I

@Ninjoe Quah I'm having the same issue. Did you able to solve it?

liorkarol
Participant I

@Ninjoe Quah Are you using Cloudflare (or other service) to routing your requests from http to https? I believe the issue is around that. I have changed the target endpoint url (that bypassed the routing service) and it works for me. It's not a solution from our side by until we will figure our the exact problem, it can be a temporary workaround.

What did you change? When I check the response to our end point, we do see cloudflare in the response.

PS: Turns out my earlier answer didn't actually fixed it, rather adding this in the Pre-flow of my Proxy.

<AssignMessage async="false" continueOnError="false" enabled="true" name="AM-FixEncoding">
    <DisplayName>AM-FixEncoding</DisplayName>
    <Properties/>
    <Set>
        <Headers>
            <Header name="Accept-Encoding">gzip,deflate</Header>
        </Headers>
    </Set>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
    <AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>

This is for the Target pre flow? Does it just occur after the predlow tag

cant remember this fix now, afaicr, i placed it where it is needed to be passed or just before the policy/target where it is erroring out.

Hm thanks. I am trying to share how I set it up but getting errors using this form.

timfong888
Participant II

@Ninjoe were you able to solve it?