()
| 21 | |
| 22 | |
| 23 | def get_dependencies() -> list[Depends]: |
| 24 | result = [] |
| 25 | if _SESSION_API_KEY: |
| 26 | result.append(Depends(check_session_api_key)) |
| 27 | elif get_global_config().app_mode == AppMode.SAAS: |
| 28 | # This merely lets the OpenAPI Docs know that an X-Session-API-Key can be |
| 29 | # used for security - it does not fail if the header is not provided |
| 30 | # (Allowing cookies to also be used) |
| 31 | result.append(Depends(APIKeyHeader(name='X-Access-Token', auto_error=False))) |
| 32 | return result |
no test coverage detected