From b660ce06f49c0105b430bcb994bdc6a0b369e862 Mon Sep 17 00:00:00 2001 From: Jizhou Deng Date: Mon, 7 Jul 2025 10:57:37 +0800 Subject: [PATCH 1/2] update map service configuration --- manual/config/seahub_settings_py.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/manual/config/seahub_settings_py.md b/manual/config/seahub_settings_py.md index 2028600b..a276436a 100644 --- a/manual/config/seahub_settings_py.md +++ b/manual/config/seahub_settings_py.md @@ -292,6 +292,21 @@ THUMBNAIL_SIZE_FOR_ORIGINAL = 1024 ``` +Options for map service: + +```python +# You can choose either Baidu Map or Google Map to enable the map service. + +# baidu map +# API key for Baidu Map. Leave empty if not used. +BAIDU_MAP_KEY = '' + +# google map +# API key for Google Map. Leave empty if not used. +GOOGLE_MAP_KEY = '' +SERVER_GOOGLE_MAP_KEY = '' +``` + ## Cloud Mode You should enable cloud mode if you use Seafile with an unknown user base. It disables the organization tab in Seahub's website to ensure that users can't access the user list. Cloud mode provides some nice features like sharing content with unregistered users and sending invitations to them. Therefore you also want to enable user registration. Through the global address book (since version 4.2.3) you can do a search for every user account. So you probably want to disable it. From a249941a6b644d1cce9f241db422630172bca88e Mon Sep 17 00:00:00 2001 From: Jizhou Deng Date: Mon, 7 Jul 2025 14:52:14 +0800 Subject: [PATCH 2/2] update map service configuration --- manual/config/seahub_settings_py.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/manual/config/seahub_settings_py.md b/manual/config/seahub_settings_py.md index a276436a..35c9001e 100644 --- a/manual/config/seahub_settings_py.md +++ b/manual/config/seahub_settings_py.md @@ -295,17 +295,18 @@ THUMBNAIL_SIZE_FOR_ORIGINAL = 1024 Options for map service: ```python -# You can choose either Baidu Map or Google Map to enable the map service. - -# baidu map -# API key for Baidu Map. Leave empty if not used. -BAIDU_MAP_KEY = '' - -# google map -# API key for Google Map. Leave empty if not used. -GOOGLE_MAP_KEY = '' -SERVER_GOOGLE_MAP_KEY = '' +# The map service currently relies on the Google Maps API and requires two API keys. +GOOGLE_MAP_KEY = '' +SERVER_GOOGLE_MAP_KEY = '' ``` +!!! warning "Required scope of the API keys" + + To safeguard your Google API Keys from abuse, restrict their usage. However, even with restrictions in place, abuse remains a risk—especially since `GOOGLE_MAP_KEY` must be included in your source code and is therefore publicly accessible. Additionally, heavy use of the maps plugin may increase your Google billing, so monitor your spending closely. + + | Key | Application restriction | API restriction | + | --- | --- | --- | + | `GOOGLE_MAP_KEY` | Restrict to your Server URL,
like `https://cloud.seafile.io` | Maps Javascript API | + | `SERVER_GOOGLE_MAP_KEY` | **No website restriction** | Geocoding API | ## Cloud Mode