Add an option to enable Default UA in HTTP Request if the rule not specified#76
Open
AlanCui4080 wants to merge 6 commits intolz233:masterfrom
Open
Add an option to enable Default UA in HTTP Request if the rule not specified#76AlanCui4080 wants to merge 6 commits intolz233:masterfrom
AlanCui4080 wants to merge 6 commits intolz233:masterfrom
Conversation
…cified (disguised as Chrome)
refactor: rename DefaultUAWhenRequest to DefaultUA
…eaned result, in order to not break applications that depends on modification time/package of Clipboard
Owner
|
I don't want this option since user can override UA per rules. Just fill device default UA when the rule not specify the UA override is a good idea. This can be obtained from Webview or OkHttp. If you wanna implement it, please let me know, otherwise, I will close this PR. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Hi,
When the UA is not specified in the rule, the HTTP(S) request will be send with no UA/ default UA, that will cause the server of the short links refuse to redirecting due to risk management and WAF, resulting cause a HTTP 404 or HTTP 412.
This PR adds an option to enable Default UA in HTTP Request if the rule not specified, and a textbox to edit the Default UA ( "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36" by default).
Alan.