mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 01:22:23 +08:00
* Update CORS configuration and add env vars to allow for user control * Add unit test * fix: add noqa comment for linting in create_refresh_token function Added a noqa comment to suppress linting warnings for the token type check in the create_refresh_token function, ensuring code clarity while maintaining compliance with linting standards. * refactor: enhance CORS tests with temporary directory usage and improve exception handling Updated unit tests for CORS configuration to utilize a temporary directory for environment variables, ensuring isolation during tests. Improved exception handling in refresh token tests to raise HTTPException with appropriate status codes and messages. This enhances test reliability and clarity. * fix: enhance CORS origin validation to ensure consistent list output Updated the validate_cors_origins method to convert a single origin string into a list for consistency, in addition to handling comma-separated strings. This change improves the robustness of CORS configuration handling. * refactor: update CORS test cases to ensure single origin is consistently treated as a list Modified unit tests for CORS configuration to assert that single origin strings are converted to lists, enhancing consistency in CORS origin handling. This change aligns with recent updates to the CORS validation logic. * re-add uvlock * [autofix.ci] apply automated fixes * feat: revert CORS changes and add deprecation warnings for v1.7 - Revert CORS behavior to maintain backward compatibility until v1.7 - Add CORS configuration fields with current defaults (*, True, *, *) - Implement deprecation warnings for upcoming v1.7 security changes - Preserve existing behavior while enabling early configuration adoption * [autofix.ci] apply automated fixes * Add back imports * Fix tests * [autofix.ci] apply automated fixes * Rt;uff * Ruff --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>