jina-ai / reader

Convert any URL to an LLM-friendly input with a simple prefix https://r.jina.ai/
https://jina.ai/reader
Apache License 2.0
7.02k stars 554 forks source link

`X-Locale` ignored after redirects #148

Closed lujjjh closed 3 weeks ago

lujjjh commented 3 weeks ago

Expected Behavior:

$ curl -sf 'https://r.jina.ai/https://httpbin.org/get' -H "X-Locale: zh" | grep Language
    "Accept-Language": "zh",

Unexpected Behavior:

curl 'https://r.jina.ai/https://httpbin.org/redirect-to?url=%2Fget' -H "X-Locale: zh" | grep Language

It appears this issue may be related to puppeteer/puppeteer#10235. Could we consider a possible workaround if it remains unresolved upstream?

nomagick commented 3 weeks ago

Thanks for reporting.

I have implemented a walkaround ebc09003d1f0e40ced2b24f891465350b8861f0a.

Check again to see if the API is behaving as expected.

lujjjh commented 3 weeks ago

Thanks. Now it works as expected.