[webapp-container] Add a command-line option to allow webapps to specify a custom UA string
Bug #1370975 reported by
Olivier Tilloy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
webbrowser-app |
Fix Released
|
Medium
|
Alexandre Abreu | ||
webbrowser-app (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
webbrowser-app (Ubuntu RTM) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Per https:/
This custom UA string would override only the default UA, it wouldn’t take precedence over other overrides.
Related branches
lp://qastaging/~abreu-alexandre/webbrowser-app/simple-user-agent-override
- Olivier Tilloy: Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 115 lines (+26/-4)4 files modifiedsrc/app/webcontainer/WebApp.qml (+12/-2)
src/app/webcontainer/webapp-container.cpp (+10/-2)
src/app/webcontainer/webapp-container.h (+1/-0)
src/app/webcontainer/webapp-container.qml (+3/-0)
Changed in webbrowser-app: | |
assignee: | nobody → Alexandre Abreu (abreu-alexandre) |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in webbrowser-app: | |
status: | In Progress → Fix Released |
Changed in webbrowser-app (Ubuntu RTM): | |
status: | Triaged → Fix Released |
To post a comment you must log in.
It is already possible to override the user agent for a given webapp. The process is bit more involving than adding a command line argument though:
- you need a webapp- properties. json file local to your webapp click package OR a manifesty.json file a unity-webapp-* folder,
- such a json file must have the listed properties:
{
"name": "<yourwebapp>",
"homepage": "<homepageurl>",
"domain": "<domain>",
"includes": []
}
- you must add a "user-agent- override" property to the file above with the proper user agent, archPath= . to your command line,
- you must also add --webappModelSe
Since all this is a bit cumbersome, I added a branch here that simplifies the process.