feat: make feed license configurable via environment variable#616
Merged
regulartim merged 5 commits intointelowlproject:developfrom Dec 17, 2025
Merged
Conversation
- Move FEEDS_LICENSE from hardcoded constant to optional environment variable - Update settings.py to read FEEDS_LICENSE from environment - Add FEEDS_LICENSE configuration to env_file_template with example - Modify API views to only include license field when FEEDS_LICENSE is set - Update tests to handle both scenarios (with/without license configured) - This allows self-hosted instances to use different licenses or none at all Fixes intelowlproject#599
…e_settings compatibility The @override_settings decorator only works when accessing settings through django.conf.settings, not with direct imports. This fixes test failures where FEEDS_LICENSE was imported directly from greedybear.settings. Changes: - api/views/utils.py: Import settings and use settings.FEEDS_LICENSE - api/views/command_sequence.py: Import settings and use settings.FEEDS_LICENSE - api/views/cowrie_session.py: Import settings and use settings.FEEDS_LICENSE - tests/test_views.py: Import settings and use settings.FEEDS_LICENSE This ensures tests with @override_settings(FEEDS_LICENSE="...") work correctly.
Contributor
Author
|
Apologies for the confusion with the previous PR #609 . I realized I had mistakenly branched off main instead of develop, which caused the commit history to become messy. To fix this, I reset my local branch to match develop and cherry-picked my specific feature commits onto it. This ensures the history is now clean, linear, and strictly contains the changes for this feature on top of the correct base branch. |
regulartim
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: make feed license configurable. Closes #599
Description
This PR makes the feed license configurable via environment variable, allowing self-hosted GreedyBear instances to use different licenses or none at all.
Changes:
FEEDS_LICENSEfrom hardcoded constant to optional environment variable.env_file_templatewith documentation.Implementation Details:
FEEDS_LICENSEis set, it's included in all API responses (feeds, enrichment, etc.).Related issues
Closes #599
Type of change
Checklist
develop.Black,Flake,Isort) gave 0 errors.