8000 Configurable CORS origins and /api/2.1, /api/2.0 jobs aliases for browser clients · Issue #92 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

Configurable CORS origins and /api/2.1, /api/2.0 jobs aliases for browser clients #92

Closed

Description

@dmux

Context

OpenArchFlow, a browser-based architecture tool, wants to run PySpark jobs against minilake through the Databricks-style REST API. Two things block this today:

  • CORS is only enabled by MINILAKE_DEV_CORS=1, which allows all origins. There is no way to allow specific origins.
  • The jobs API is only registered under /api/2.2/jobs. Requests to /api/2.1/jobs and /api/2.0/jobs hit the catch-all and return 501. Older SDK and CLI versions use these paths.

Scope

  • Add MINILAKE_CORS_ORIGINS, a comma-separated list of allowed origins (* is allowed). When set, enable CORSMiddleware for those origins. MINILAKE_DEV_CORS=1 keeps working.
  • Answer preflight requests with Access-Control-Allow-Private-Network: true, so HTTPS pages can call a local minilake.
  • Register /api/2.1/jobs and /api/2.0/jobs as aliases of the existing jobs router.
  • Set a default for the new variable in docker-compose.yml and document it in docs/configuration.md and FEATURES.md.

Acceptance criteria

  • A preflight OPTIONS request from an allowed origin returns the CORS headers. A disallowed origin does not.
  • runs/submit, runs/get, run-now and runs/get-output respond under /api/2.0, /api/2.1 and /api/2.2.
  • Tests cover CORS (tests/test_app.py) and the aliases (tests/test_jobs_submit.py).

Activity

  1. self-assigned this
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0