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

update user agent to include spin version #68

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

karthik2804
Copy link
Collaborator

closes #14

@karthik2804 karthik2804 requested a review from lann August 18, 2023 22:51
@karthik2804 karthik2804 marked this pull request as ready for review August 18, 2023 22:52
Copy link
Collaborator

@lann lann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitty suggestion

env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION")
env!("CARGO_PKG_VERSION"),
std::env::var("SPIN_VERSION").unwrap_or_default()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe do this to help out UA parsers that expect something after the /:

Suggested change
std::env::var("SPIN_VERSION").unwrap_or_default()
std::env::var("SPIN_VERSION").unwrap_or_else(|| "0".to_string())

Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
@karthik2804 karthik2804 merged commit 717f55a into fermyon:main Aug 21, 2023
8 checks passed
@karthik2804 karthik2804 deleted the better_user_agent branch August 21, 2023 15:51
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.

Improve user-agent
2 participants