Skip to content

Desktop: Allow changing user agent when syncing #2050

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

Closed
wants to merge 1 commit into from
Closed

Desktop: Allow changing user agent when syncing #2050

wants to merge 1 commit into from

Conversation

AlexPaphitis
Copy link

Hi hope you're all well :)

This is a pull request to allow changing the user agent used when syncing in both the CLI and Desktop versions of Joplin. The user agent default value is set to Joplin.

I wanted to add this because of the raised issue #2042

Thank you,
Alex

@laurent22
Copy link
Owner

laurent22 commented Nov 1, 2019

Thanks for the pull request. There's no need to manually change the user agent so let's hard code it to "Joplin/1.0" for now. Also please check that the header is not already set before setting it (it makes the code a bit more durable, in case the caller changes it to something else).

@Ardakilic
Copy link
Contributor

Regarding my initial request on #2042 , a hardcoded a user-agent would suffice nicely for my use case.

@laurent22
Copy link
Owner

Yes I don't see a requirement for spoofing the user agent at this point. It could be needed later on, but for now just a hard-coded string would work.

@tessus
Copy link
Collaborator

tessus commented Nov 2, 2019

It could be needed later on, but for now just a hard-coded string would work.

So the best way to handle this would be to just change the value to Joplin/1.0, remove isEnum and show, and change public to false. Or do you mean really hard code it in WebDavApi.js?

@laurent22
Copy link
Owner

Yes hard coded directly in WebDavApi, with no setting. So i guess the pull request would really just be one line of code.

@tessus
Copy link
Collaborator

tessus commented Nov 4, 2019

@AlexPaphitis are you planning to do the requested changes or is this another one-fire-Hacktoberfest-PR which is now abandoned? (Sorry, this sounded harsher than it was meant.)

@laurent22
Copy link
Owner

Closing due to no answer.

@Ardakilic
Copy link
Contributor

If required, I can create a separate PR with a hard-coded user-agent string change, like given in this PR.

@laurent22
Copy link
Owner

@Ardakilic, yes definitely, the PR would be accepted as this hard-coded string is all we need.

@Ardakilic
Copy link
Contributor

Awesome! I'm currently at work, so I'll see what I can do in the evening.

@tessus
Copy link
Collaborator

tessus commented Nov 5, 2019 via email

@tessus
Copy link
Collaborator

tessus commented Nov 5, 2019

@Ardakilic since you haven't replied, here's the new PR: #2064

@Ardakilic
Copy link
Contributor

Timezones man, they suck on global projects for cases like these. I was working on this now, and yes it took longer than I've anticipated, because I also have to build the development environment of Joplin to test the headers as you've mentioned. I could just add the line and have sent a PR, which was my initial thought. Anyways, thank you @tessus for not keeping this issue orphan.

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

Successfully merging this pull request may close these issues.

4 participants