parent
17539404b2
commit
50e2250fe0
5 changed files with 10 additions and 0 deletions
|
@ -35,6 +35,8 @@
|
|||
</html:div>
|
||||
|
||||
<checkbox label="&zotero.preferences.reportTranslationFailure;" preference="extensions.zotero.reportTranslationFailure" native="true"/>
|
||||
|
||||
<checkbox data-l10n-id="preferences-advanced-enable-local-api" preference="extensions.zotero.httpServer.localAPI.enabled" native="true"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
|
|
|
@ -87,6 +87,10 @@ const exportFormats = new Map([
|
|||
*/
|
||||
class LocalAPIEndpoint {
|
||||
async init(requestData) {
|
||||
if (!Zotero.Prefs.get('httpServer.localAPI.enabled')) {
|
||||
return this.makeResponse(403, 'text/plain', 'Local API is not enabled');
|
||||
}
|
||||
|
||||
let apiVersion = parseInt(
|
||||
requestData.headers['Zotero-API-Version']
|
||||
|| requestData.searchParams.get('v')
|
||||
|
|
|
@ -56,6 +56,8 @@ preferences-styleManager-add-button =
|
|||
.tooltiptext = Add a style from a file
|
||||
.label = { $label }
|
||||
|
||||
preferences-advanced-enable-local-api =
|
||||
.label = Allow other applications on this computer to communicate with { -app-name }
|
||||
preferences-advanced-language-and-region-title = Language and Region
|
||||
preferences-advanced-enable-bidi-ui =
|
||||
.label = Enable bidirectional text editing utilities
|
||||
|
|
|
@ -144,6 +144,7 @@ pref("extensions.zotero.integration.dontPromptMendeleyImport", false);
|
|||
// Connector settings
|
||||
pref("extensions.zotero.httpServer.enabled", true);
|
||||
pref("extensions.zotero.httpServer.port", 23119); // ascii "ZO"
|
||||
pref("extensions.zotero.httpServer.localAPI.enabled", false);
|
||||
|
||||
// Zeroconf
|
||||
pref("extensions.zotero.zeroconf.server.enabled", false);
|
||||
|
|
|
@ -137,6 +137,7 @@ user_pref("extensions.zotero.firstRunGuidance", false);
|
|||
user_pref("extensions.zotero.firstRun2", false);
|
||||
user_pref("extensions.zotero.reportTranslationFailure", false);
|
||||
user_pref("extensions.zotero.httpServer.enabled", true);
|
||||
user_pref("extensions.zotero.httpServer.localAPI.enabled", true);
|
||||
user_pref("extensions.zotero.backup.numBackups", 0);
|
||||
user_pref("extensions.zotero.sync.autoSync", false);
|
||||
user_pref("extensions.zoteroMacWordIntegration.installed", true);
|
||||
|
|
Loading…
Reference in a new issue