Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept null in place of userAgent string #235

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

omrilotan
Copy link
Owner

I can see it is a common use case to use the headers getter, which makes sense.

With this change, users will be able to remove the check by the user and maintain type compliance. This allows cleaner code for the user.

- isbot(request.headers.get("user-agent") || "")
+ isbot(request.headers.get("user-agent"))

@omrilotan omrilotan merged commit d3e37df into main Jan 3, 2024
1 check passed
@omrilotan omrilotan deleted the accept_null_useragent branch January 3, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant