update go packages version, add ip proxy and real ip headers to config.
This commit is contained in:
@@ -24,7 +24,7 @@ A modern, responsive web interface for viewing and editing Obsidian markdown not
|
||||
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/yourusername/gobsidian.git
|
||||
git clone https://ghb.freebede.com/nahakubuilder/gobsidian.git
|
||||
cd gobsidian
|
||||
```
|
||||
|
||||
@@ -38,33 +38,59 @@ A modern, responsive web interface for viewing and editing Obsidian markdown not
|
||||
go run cmd/main.go
|
||||
```
|
||||
|
||||
4. Open your browser and navigate to `http://localhost:8080`
|
||||
4. Open your browser and navigate to `http://localhost:3000`
|
||||
|
||||
## Configuration
|
||||
|
||||
On first run, Gobsidian will create a `settings.ini` file with default configurations. You can modify these settings through the web interface at `/settings` or by editing the file directly.
|
||||
- initial login admin/admin << Make sure you change the password!
|
||||
|
||||
### Default Configuration
|
||||
|
||||
```ini
|
||||
[SERVER]
|
||||
HOST = 0.0.0.0
|
||||
PORT = 8080
|
||||
SECRET_KEY = change-this-secret-key
|
||||
DEBUG = false
|
||||
SECRET_KEY = change-this-secret-key
|
||||
DEBUG = false
|
||||
MAX_CONTENT_LENGTH = 16
|
||||
URL_PREFIX =
|
||||
HOST = 0.0.0.0
|
||||
PORT = 3000
|
||||
|
||||
[MD_NOTES_APP]
|
||||
APP_NAME = Gobsidian
|
||||
NOTES_DIR = notes
|
||||
NOTES_DIR_HIDE_SIDEPANE = attached, images
|
||||
NOTES_DIR_SKIP = secret, private
|
||||
IMAGES_HIDE = false
|
||||
IMAGE_STORAGE_MODE = 1
|
||||
IMAGE_STORAGE_PATH = images
|
||||
IMAGE_SUBFOLDER_NAME = attached
|
||||
IMAGE_STORAGE_MODE = 1
|
||||
ALLOWED_IMAGE_EXTENSIONS = jpg, jpeg, png, webp, gif
|
||||
ALLOWED_FILE_EXTENSIONS = txt, pdf, html, json, yaml, yml, conf, csv, cmd, bat, sh
|
||||
ALLOWED_FILE_EXTENSIONS = txt, pdf, html, json, yaml, yml, conf, csv, cmd, bat, sh
|
||||
SHOW_IMAGES_IN_TREE = false
|
||||
SHOW_IMAGES_IN_FOLDER = true
|
||||
APP_NAME = Gobsidian
|
||||
NOTES_DIR = notes
|
||||
NOTES_DIR_HIDE_SIDEPANE = attached, images
|
||||
NOTES_DIR_SKIP = secret, private
|
||||
IMAGE_STORAGE_PATH = images
|
||||
IMAGE_SUBFOLDER_NAME = attached
|
||||
SHOW_FILES_IN_TREE = true
|
||||
SHOW_FILES_IN_FOLDER = true
|
||||
IMAGES_HIDE = false
|
||||
|
||||
[DATABASE]
|
||||
TYPE = sqlite
|
||||
PATH = data/gobsidian.db
|
||||
|
||||
[AUTH]
|
||||
REQUIRE_ADMIN_ACTIVATION = true
|
||||
REQUIRE_EMAIL_CONFIRMATION = false
|
||||
MFA_ENABLED_BY_DEFAULT = false
|
||||
|
||||
[SECURITY]
|
||||
PWD_FAILURES_THRESHOLD = 5
|
||||
MFA_FAILURES_THRESHOLD = 10
|
||||
FAILURES_WINDOW_MINUTES = 30
|
||||
AUTO_BAN_DURATION_HOURS = 12
|
||||
AUTO_BAN_PERMANENT = false
|
||||
|
||||
[PROXY]
|
||||
TRUSTED_PROXIES = 127.0.0.1, ::1
|
||||
REAL_IP_HEADERS = CF-Connecting-IP, X-Forwarded-For, X-Real-IP
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Reference in New Issue
Block a user