snowplow / snowplow/snowplow-javascript-tracker
Placeholder issue for configurable request timeout and withCredentials parameters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 590
- Forks
- 232
- Avg merge
- 2h 22m
- Merged PRs (30d)
- 3
Description
As raised on discourse - opening this issue to record the case for these features & consider viability.
Reasons for configuring timeout parameter are as follows:
Request is getting cancelled in browser when page is taking time to load(either because of slow internet connection or page is loaded for the first time).Someone in the past has already raised issue for this in snowplow github as well as snowplow discourse (Add possibility to set timeout).
Performing business logic when POST request hits application server. I know architecturally performing business logic in request-response cycle is not good. I am myself using celery to perform business logic in background. I just save the POST data and return response. Still i think there has to be possibility for this otherwise request will always get cancelled if applying business logic and sending response takes more than 5 seconds.
Reason for configuring “withCredentials” parameter is as follows
I am talking about case when tracker is deployed on third party websites. Right now in order to make POST request successful i can send only one origin value in “Access-Control-Allow-Origin” header when repsonding to preflight OPTIONS request. Now suppose i want make my tracking code to have same collector url but it can be used on multiple third party website(setting app id different for each website so that i can identify visitors ).In that case i have to pass ‘*’ (wildcard) in “Access-Control-Allow-Origin” header. This is not possible when “withCredentials” set to true.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Start by locating the request implementation and determine how configurable timeout and withCredentials behavior should be specified; done requires an agreed viable design for both parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100