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

Detect TWA or PWA request #192

Closed
kilicabdulkadir opened this issue Sep 27, 2022 · 3 comments
Closed

Detect TWA or PWA request #192

kilicabdulkadir opened this issue Sep 27, 2022 · 3 comments

Comments

@kilicabdulkadir
Copy link

Can we detect requests opened via TWA (Trusted Web Application) through this package?

@hisorange
Copy link
Owner

At first glance I don't think we can. As this package only works with the HTTP requests made toward the server and processes the User-Agent header, any client side behaviour should be detected on the client.

TWA should make no difference in the application's backend code.
But let me know if this is reflected somewhere in the UA.

@kilicabdulkadir
Copy link
Author

Sometimes application markets can remove the application from the market because there are payment screens on the sites. There may be a need to convert the website to PWA and publish them in application markets (TWA). In order to prevent the application from being removed from the markets, phrases such as "Please continue on the website" are written where the payment sections are. Wouldn't that be useful for controlling it ?

@hisorange
Copy link
Owner

Oh I think there is a misunderstanding. This package only works from the HTTP request's User Agent header.
From my readings, the TWA makes no difference for this header.

Your use case seems to be a 100% client side. ^.^

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

No branches or pull requests

2 participants