Closed awoehrl closed 6 months ago
Thank you for raising @awoehrl ! That is definitely something to look into for next release!
Hi @awoehrl!
There is indeed an issue with the HTTP headers related to how the client stores them in template data storage. In addition, at the moment the Client does not relay any content-negotiation (based on Accept-Encoding
). More specifically, the request to jsDelivr has no such header.
This means that:
Content-Encoding
header value (e.g. gzip
as suggested in the issue description) when there is no compression implemented would be incorrect.As mentioned, the current state is not ideal because:
On the other hand (issue #40 aside), the current Client behaviour is simple and not really incorrect. Still, since we know (based on the Vary
response header from CDN) that the Accept-Encoding
header is the only one influencing the content of sp.js, we could possibly go a step further here, so leaving this issue open for now.
Resolved as part of https://github.com/snowplow/snowplow-gtm-server-side-client/issues/40 . Closing.
Hi!
When using Cloud Run instead of AppEngine for sGTM, trying to load the Snowplow JS library throws an 502 error. The root cause seems to be that Cloud Run doesn't include a content-encoding=gzip header in the response. AppEngine adds this automatically. (https://www.simoahava.com/analytics/custom-gtm-loader-server-side-tagging/#commento-568ba0c7ae603cac4a54ec5eba335fb110b8164b9ff2406ed9d212f6d9a5a5b1)
Best Andreas