Skip to content

Commit cc17f9b

Browse files
committed
fix(newbookmark): Use neutral user agent to get correct title
fixes #1778 fixes #1332 Signed-off-by: Marcel Klehr <[email protected]>
1 parent 98d7d8d commit cc17f9b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ui/views/native/Home.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ export default {
7070
7171
console.log(url)
7272
try {
73-
const response = await Http.get({ url })
73+
const response = await Http.get({ url,
74+
headers: {
75+
'user-agent': 'curl/8.6.0'
76+
}
77+
})
7478
const parser = new DOMParser()
79+
console.log(response.data)
7580
const document = parser.parseFromString(response.data, 'text/html')
7681
const titleElement = document.getElementsByTagName('title')[0]
7782
if (titleElement) {

0 commit comments

Comments
 (0)