14 Commits

Author SHA1 Message Date
Chris
1a8fe19416 Fix/cors csp (#64)
* CORS/CSP fix

* deprecate ALLOWED_IFRAME_ORIGINS

* Revert "deprecate ALLOWED_IFRAME_ORIGINS"

This reverts commit 9792f06691.

* Reapply "deprecate ALLOWED_IFRAME_ORIGINS"

This reverts commit 683ee93036.

* Add helmet config and deprecate previous ALLOWED_IFRAME_ORIGINS

* add build to docker compose for local builds

* set server to listen on 0.0.0.0 and control with cors

* Remove hsts from helmet and apply new pin status check limits

* add back allowed_iframe_origins env as a fallback for allowed_origins

* update readme for allowed_iframe_origins
2025-06-20 15:07:56 -07:00
greirson
5177752a6a chore: Update comments in environment configuration files to clarify BASE_URL usage 2025-05-09 07:59:14 -07:00
Greirson Lee-Thorp
e963f2bcde feat: Improve dev experience, Improve Environmental Variable and Folder Control, resolves BASE_URL junk (#49)
* feat: Add ALLOWED_IFRAME_ORIGINS configuration and update security headers (#47)

- Introduced ALLOWED_IFRAME_ORIGINS environment variable to specify trusted origins for iframe embedding.
- Updated security headers middleware to conditionally allow specified origins in Content Security Policy.
- Enhanced documentation in README.md to explain the new configuration and its security implications.

Fixes #35

* feat: Update .env.example and .gitignore for improved configuration management

- Enhanced .env.example with detailed comments for environment variables, including upload settings, security options, and notification configurations.
- Updated .gitignore to include additional editor and OS-specific files, ensuring a cleaner repository.
- Modified package.json to add a predev script for Node.js version validation and adjusted the dev script for nodemon.
- Improved server.js shutdown handling to prevent multiple shutdowns and ensure graceful exits.
- Refactored config/index.js to log loaded environment variables and ensure the upload directory exists based on environment settings.
- Cleaned up fileUtils.js by removing unused functions and improving logging for directory creation.

This commit enhances clarity and maintainability of configuration settings and improves application shutdown behavior.

* feat: Update Docker configuration and documentation for upload handling

- Explicitly set the upload directory environment variable in docker-compose.yml to ensure clarity in file storage.
- Simplified the Dockerfile by removing the creation of the local_uploads directory, as it is now managed by the host system.
- Enhanced README.md to reflect changes in upload directory management and provide clearer instructions for users.
- Removed outdated development configuration files to streamline the development setup.

This commit improves the clarity and usability of the Docker setup for file uploads.

* feat: Add Local Development Guide and update README for clarity

- Introduced a comprehensive LOCAL_DEVELOPMENT.md file with setup instructions, testing guidelines, and troubleshooting tips for local development.
- Updated README.md to include a link to the new Local Development Guide and revised sections for clarity regarding upload directory management.
- Enhanced the Quick Start section to direct users to the dedicated local development documentation.

This commit improves the onboarding experience for developers and provides clear instructions for local setup.

* feat: Implement BASE_URL configuration for asset management and API requests

- Added BASE_URL configuration to README.md, emphasizing the need for a trailing slash when deploying under a subpath.
- Updated index.html and login.html to utilize BASE_URL for linking stylesheets, icons, and API requests, ensuring correct asset loading.
- Enhanced app.js to replace placeholders with the actual BASE_URL during HTML rendering.
- Implemented a validation check in config/index.js to ensure BASE_URL is a valid URL and ends with a trailing slash.

This commit improves the flexibility of the application for different deployment scenarios and enhances asset management.

Fixes #34, Fixes #39, Fixes #38

* Update app.js, borked some of the css n such

* resolved BASE_URL breaking frontend

* fix: Update BASE_URL handling and security headers

- Ensured BASE_URL has a trailing slash in app.js to prevent asset loading issues.
- Refactored index.html and login.html to remove leading slashes from API paths for correct concatenation with BASE_URL.
- Enhanced security headers middleware to include 'connect-src' directive in Content Security Policy.

This commit addresses issues with asset management and improves security configurations.
2025-05-04 10:29:48 -07:00
Greirson Lee-Thorp
1b40cf2e8e feat: add BASE_URL configuration for flexible deployment environments (#30)
- Introduce BASE_URL environment variable for flexible application URL configuration
- Update .env.example, docker-compose, and README with new configuration option
- Implement BASE_URL validation in config module
- Modify server logging to use configurable base URL
- Provide default base URL generation when not explicitly set
2025-02-16 23:47:32 -08:00
Greirson Lee-Thorp
22f79f830b feat: Complete Application Infrastructure and Security Overhaul (#28)
Chores & Configuration
	•	Enhanced development setup: optimized Dockerfile, refined scripts, and improved .gitignore.
	•	Updated docker-compose for better dev/prod separation.
	•	Improved documentation in README and source files.

Features & Enhancements
	•	Refactored project structure with modular architecture.
	•	Improved testing infrastructure and integration tests.
	•	Enhanced file upload logic, client-side handling, and API routes.
	•	Implemented robust server shutdown, rate limiting, and cleanup mechanisms.
	•	Improved upload progress tracking with UI enhancements.
	•	Strengthened security in PIN authentication and cookie handling.

Refactors & Fixes
	•	Cleaned up test infrastructure, logging, and error handling.
	•	Simplified API route paths and improved middleware.
	•	Fixed incorrect total storage size reporting.
	•	Optimized logging verbosity based on environment.

Documentation
	•	Expanded project documentation and comments for clarity.
2025-02-16 15:39:13 -08:00
Greirson Lee-Thorp
6f0918a530 docs/test: Add dev setup and update docs (#23)
* feat: Add development environment configuration

- Create dev/dev.sh script for simplified development workflow
- Add docker-compose.dev.yml for local development setup
- Update .gitignore to exclude dev directory except specific files
- Add development section to README.md with guide reference

* docs: Update README and docker-compose with comprehensive setup instructions and configuration options
2025-02-04 21:15:21 -08:00
Greirson Lee-Thorp
16447493bf Merge branch 'main' into even-dumber-drop 2025-02-04 09:52:10 -08:00
Greirson Lee-Thorp
1a5bc93e01 feat: Add auto upload configuration and update environment settings
- Introduce AUTO_UPLOAD environment variable to enable automatic file uploads
- Update .env.example with new configuration options
- Modify docker-compose.yml to use new image and comment out default settings
- Update README.md to document AUTO_UPLOAD feature
- Implement client-side auto upload logic in index.html
- Add server-side logging for auto upload status
chore: Refactor notification message template and size unit handling
2025-02-03 22:11:21 -08:00
Greirson Lee-Thorp
490790a6a6 feat: enhance security with rate limiting and file extension filtering
- Add express-rate-limit for API and upload routes
- Implement optional file extension filtering via ALLOWED_EXTENSIONS
- Add security headers middleware
- Update docker-compose image to official repository
- Update README with new environment variable and filtering documentation
2025-02-02 20:53:13 -08:00
Greirson Lee-Thorp
89fe5c7cb7 dont worry about it 2025-01-31 21:39:35 -08:00
Greirson Lee-Thorp
34c12d47fb added storage placeholder for total size of upload folder 2025-01-31 21:28:53 -08:00
Greirson Lee-Thorp
aec1265178 Add notifications support via Apprise
- Added Apprise integration for flexible notifications
- Added notification environment variables
- Added notification logging
- Updated documentation with setup instructions
- Added Python and Apprise to Dockerfile
2025-01-30 20:52:28 -08:00
arbs09
c6d8561d0f edit 2025-01-25 19:58:40 +01:00
arbs09
8fdc507d87 add docker compose 2025-01-25 19:56:11 +01:00