-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.yaml
124 lines (104 loc) · 3.03 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Database configuration
database:
# Database driver: "sqlite" or "postgres"
driver: postgres
host: localhost
port: 5432
user: watzon
name: "0x45"
sslmode: disable # Options: disable, require, verify-ca, verify-full
# Storage configuration
storage:
- name: local
type: local
path: ./uploads
default: true
# - name: s3
# type: s3
# s3_bucket: paste69-bucket
# s3_region: us-east-1
# s3_key: your-access-key
# s3_secret: your-secret-key
# s3_endpoint: https://localhost.localstack.cloud:4566
# Server configuration
server:
# Server binding address
address: :3000
# Public-facing URL (used for generating links)
base_url: http://localhost:3000
# Maximum upload size in bytes (hard server limit)
max_upload_size: 104857600 # 100 MB
# Maximum upload size in bytes (normal users)
default_upload_size: 10485760 # 10 MB
# Maximim upload size in bytes (users with API key)
api_upload_size: 52428800 # 50 MB
# Preforking
prefork: false
# Rate limiting configuration
rate_limit:
# Global rate limit (across all IPs)
global:
enabled: true # Enable/disable global rate limiting
rate: 6969.0 # Requests per second
burst: 250 # Maximum burst size
# Per-IP rate limit
per_ip:
enabled: true # Enable/disable per-IP rate limiting
rate: 2.0 # Requests per second per IP
burst: 5 # Maximum burst size
# Use Redis for rate limiting if it's available (required for prefork)
use_redis: false
# How often to clean up inactive IP limiters
ip_cleanup_interval: 1h
# Security settings
security:
cors_enabled: true
cors_origins: ["*"]
cors_methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
# HTTPS/TLS configuration
tls_enabled: false
cert_file: ./certs/cert.pem
key_file: ./certs/key.pem
# Logging configuration
logging:
level: info # debug, info, warn, error
format: json # text or json
output: stdout # stdout, stderr, or file path
# Cleanup configuration
cleanup:
enabled: true
interval: 3600 # Cleanup interval in seconds
max_age: 168h # Maximum age for temporary pastes (7 days)
# SMTP configuration for sending emails with PostPilot
smtp:
enabled: true # Set to true to enable email features
host: localhost
port: 1025
username:
password:
from: noreply@0x45.st
from_name: Paste69
starttls: false
tls_verify: false
# Redis configuration
redis:
enabled: false
address: localhost:6379
password: ""
db: 0
# Retention configuration
retention:
no_key:
min_age: 15.0 # Minimum retention in days
max_age: 365.0 # Maximum retention in days (1 year)
with_key:
min_age: 30.0 # Minimum retention in days
max_age: 730.0 # Maximum retention in days (2 years)
points: 50 # Number of points to generate for the curve
# Feature flags (TODO)
features:
url_shortener: true
file_preview: true
syntax_highlighting: true
api_keys: true
base_url: http://localhost:3000