Skip to content

Commit 17aef14

Browse files
tessusscoroi
authored andcommitted
All: Resolves laurent22#2042: Set user-agent header to Joplin/1.0 (laurent22#2064)
closes laurent22#2042
1 parent 6d4d664 commit 17aef14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ReactNativeClient/lib/WebDavApi.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ class WebDavApi {
350350
// finds out that no resource has this ID and simply sends the requested data.
351351
// Also add a random value to make sure the eTag is unique for each call.
352352
if (['GET', 'HEAD'].indexOf(method) < 0) headers['If-None-Match'] = `JoplinIgnore-${Math.floor(Math.random() * 100000)}`;
353+
if (!headers['User-Agent']) headers['User-Agent'] = 'Joplin/1.0';
353354

354355
const fetchOptions = {};
355356
fetchOptions.headers = headers;

0 commit comments

Comments
 (0)