Test the new LanguageTool add-on for Google Docs

Thank you, it’s just amazing.

Hello,

is it possible to run this add-on against a local instance of LanguageTool (https://localhost:8081/api/v2/) or does this add-on only work against public web facing URL ( https://{some non local IP or domain-name}/api/v2/ ) ?

Though I would understand if not:

  • usually local instance is for privacy-minded people who don’t very much like their data going through a 3rd party
  • Google Docs is the absolute opposite of privacy (all your data lives on someone else’s computer).

But at least if one already has a local servlet running for other actual privacy reasons, one might as well use it for google docs too. (Which has the bonus advantage of not taxing languagetool’s public servers and reducing your operating costs).

Using your own server should be possible. This is from the settings dialog:

google-docs-setting

1 Like

Sorry, I didn’t express myself clearly enough. The question was not where the option for the URL is (I found it), but whether a http:// on local host could work in this place. I have no clear idea of the architecture of Google Docs (I seldom use it)

  • The add-on code running in the browser locally, I think ? (Not some server-side stuff at Google’s, that would never be able to connect locally)
  • Are there any restriction against cross-site scripting, etc. That would prevent an http:// server being used by google docs running on https:// ?
  • Are there any restriction against cross-site scripting, etc. That would a web app served from the internet to contact a localhost address ?

I’ve tried switching the URL, but the corrections from LanguageTool seem to not be working, I’m getting: “Error: Cannot connect to the server http://localhost:8081/v2” message in the check window.
(Meanwhile, the same URL works perfectly with the LanguageTool Firefox plugin).

I was wondering if the problem is on my side (I’m doing something wrong), or if there are technical limitations (due to anti-XSS, etc.)

You’re right, that part of the code could be server-side (haven’t checked now). If you have started the server with --allow-origin '*' and it still doesn’t work, it’s probably not possible.

1 Like