Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# - 0.0.0.0 = all interfaces (production, accessible from network)
HOST_BINDING=127.0.0.1

# Secret session key for cookies
# Used to digitally sign cookies to prevent tampering
SECRET_KEY=cange-me-in-prod

# Local mode - enables auto-login with admin access, no rate limits
# Set to "true" for local development, "false" for production
LOCAL_MODE=true
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ For production deployment with user authentication, edit your `.env` file:
LOCAL_MODE=false
HOST_BINDING=0.0.0.0
REGISTRATION_DISABLED=false
SECRET_KEY=super-secret-secret-key-goes-here--preferably-a-random-string
```


Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
DISABLE_GUEST = args.disable_guest or os.getenv('DISABLE_GUEST', '').lower() in ('true', '1', 'yes')

app = Flask(__name__, template_folder='web/templates', static_folder='web/static')
app.secret_key = 'librecrawl-secret-key-change-in-production' # TODO: Use environment variable in production
app.secret_key = os.getenv('SECRET_KEY', 'change-me-in-prod')

# Enable compression for all responses
Compress(app)
Expand Down