microsoft / clarity

A behavioral analytics library that uses dom mutations and user interactions to generate aggregated insights.
https://clarity.microsoft.com
MIT License
2.1k stars 212 forks source link

External resources 400 bad request #259

Open dmtrKovalenko opened 2 years ago

dmtrKovalenko commented 2 years ago

When viewing the recording on a platform I noticed that all the external resources return 400 bad requests.

Urls are https://clarity.microsoft.com/external/resources?url={{actual app url}}

Here is the curl output

< HTTP/2 400 
< cache-control: public, max-age=60
< content-type: text/plain; charset=utf-8
< x-cache: CONFIG_NOCACHE
< x-msedge-ref: Ref A: 3583748E6D8B463099D411B0A731CB89 Ref B: VIEEDGE1116 Ref C: 2022-07-19T11:53:52Z
< date: Tue, 19 Jul 2022 11:53:52 GMT

But the body returns the correct URL.

Issue request: Can you please provide more info in the body about why this request gets 400 and how to resolve this issue.

Palm5 commented 2 years ago

I have the same issue. Curl works fine, but in the platform every external resource (css in primis) give 400.

Warxcell commented 2 years ago

+1

eschulma commented 1 year ago

Same. I already had to rewrite our stylesheet and image URLs server-side to get around the fact that Clarity doesn't handle the <base> tag; now this is causing all of our CDN bootstrap calls to fail.

ClaritySupport commented 1 year ago

@dmtrKovalenko ,we cannot find any logs for the traceId shared in your report. Can you share with i exact link?

We do handle the base tag so could you please share references and your projectIds/sample recordings/failing requests so that we can check deeper.