0e9dc86f3b
fix: use UnauthorizedAndForceLogout to trigger frontend logout on license expiry
...
Change license check to raise UnauthorizedAndForceLogout exception instead
of returning generic JSON response. This ensures proper frontend handling:
Frontend behavior (service/base.ts line 588):
- Checks if code === 'unauthorized_and_force_logout'
- Executes globalThis.location.reload()
- Forces user logout and redirect to login page
- Login page displays license expiration UI (already exists)
Response format:
- HTTP 401 (not 403)
- code: "unauthorized_and_force_logout"
- Triggers frontend reload which clears auth state
This completes the license enforcement flow:
1. Backend blocks all business APIs when license expires
2. Backend returns proper error code to trigger logout
3. Frontend reloads and redirects to login
4. Login page shows license expiration message
2026-03-04 20:30:53 -08:00
0ed39d81e9
feat: add global license check middleware to block API access on expiry
...
Add before_request middleware that validates enterprise license status
for all /console/api endpoints when ENTERPRISE_ENABLED is true.
Behavior:
- Checks license status before each console API request
- Returns 403 with clear error message when license is expired/inactive/lost
- Exempts auth endpoints (login, oauth, forgot-password, etc.)
- Exempts /console/api/features so frontend can fetch license status
- Gracefully handles errors to avoid service disruption
This ensures all business APIs are blocked when license expires,
addressing the issue where APIs remained callable after expiry.
2026-03-04 20:10:42 -08:00
7ef139cadd
Squash merge 1.12.1-otel-ee into release/e-1.12.1
2026-03-04 16:59:37 -08:00
5bf0251554
chore(typing): reduce ty excludes for A1 ( #31721 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 02:38:57 +08:00
8d45755303
feat: init fastopenapi ( #30453 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-23 21:07:52 +09:00
3b225c01da
refactor: refactor workflow context ( #30607 )
2026-01-19 12:18:51 +08:00
5362f69083
feat(refactoring): Support Structured Logging (JSON) ( #30170 )
2026-01-04 11:46:46 +08:00
44f8915e30
feat: Add Aliyun SLS (Simple Log Service) integration for workflow execution logging ( #28986 )
...
Co-authored-by: hieheihei <270985384@qq.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com >
2025-12-17 13:43:54 +08:00
094f417b32
refactor: admin api using session factory ( #29628 )
2025-12-15 12:01:41 +08:00
f48522e923
feat: add x-trace-id to http responses and logs ( #29015 )
...
Introduce trace id to http responses and logs to facilitate debugging process.
2025-12-02 17:22:34 +08:00
d162f7e5ef
feat(api): automatically NODE_TYPE_CLASSES_MAPPING generation from node class definitions ( #28525 )
2025-12-01 14:14:19 +08:00
3cf19dc07f
add two test examples ( #28236 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-21 10:36:41 +08:00
a2e0f80c01
[Chore/Refactor] Improve type checking configuration ( #25185 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-05 08:34:18 +08:00
3032e6fe59
example for logging ( #24441 )
2025-08-25 11:41:17 +08:00
e340fccafb
feat: integrate flask-orjson for improved JSON serialization performance ( #23935 )
2025-08-14 19:50:59 +08:00
a189d293f8
make logging not use f-str, change others to f-str ( #22882 )
2025-07-25 10:32:48 +08:00
6a74c97a0a
feat: add debug log for request and response ( #19781 ) ( #19783 )
...
Co-authored-by: hashjang <hash@geek.com >
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com >
2025-05-17 17:31:09 +08:00
505d4cce78
Revert "sort extensions for review," ( #19496 )
2025-05-11 16:57:13 +08:00
c431da9571
sort extensions for review, ( #19470 )
...
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com >
2025-05-10 20:01:31 +08:00
f23cf98317
refactor: Remove RepositoryFactory ( #19176 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-05-06 21:14:51 +08:00
8299614e60
[Observability][Bugfix] Fix expected an instance of Token, got None error in OpenTelemetry ( #18934 )
2025-04-28 10:31:13 +08:00
61e39bccdf
fix: Patch OpenTelemetry to handle None tokens ( #18498 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-04-22 16:04:20 +08:00
6d9dd3109e
feat: add a abstract layer for WorkflowNodeExcetion ( #18026 )
2025-04-17 12:48:52 +09:00
5f8d20b5b2
[Observability] Integrate OpenTelemetry ( #17627 )
2025-04-11 17:04:06 +08:00
490b6d092e
Fix/plugin race condition ( #14253 )
2025-02-25 12:20:47 +08:00
99f40a9682
feat: full support for opendal and sync configurations between .env and docker-compose ( #11754 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2024-12-18 09:05:54 +08:00
e86756cb39
feat(app_factory): speed up api startup ( #11762 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2024-12-18 09:05:31 +08:00
9b46b02717
refactor: assembling the app features in modular way ( #9129 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: -LAN- <laipz8200@outlook.com >
2024-11-30 23:05:22 +08:00
6f418da388
Fixes #11065 : tenant_id not found when login via ADMIN_KEY ( #11066 )
2024-11-27 19:50:56 +08:00
0e8ab0588f
fix: ( #10437 followup) fix conditions with DEBUG config ( #10438 )
2024-11-08 09:42:53 +08:00
0ebe198ff1
chore: use DEBUG in dify_config instead of parsing raw system environment variable in place ( #10437 )
2024-11-08 09:34:11 +08:00
4d9160ca9f
refactor: use dify_config to replace legacy usage of flask app's config ( #9089 )
2024-10-22 11:01:32 +08:00
83b2b8fe60
refactor: add logging extension module for log initialization ( #9524 )
2024-10-22 09:00:44 +08:00
28de676956
controller test ( #9469 )
2024-10-18 08:23:36 +08:00