FortyDN Dev commited on
Commit ·
5979e23
1
Parent(s): de745bf
fix(auth): exact-match open paths for engine/status, metrics/inference, smtp/probe
Browse files_is_open_path() excludes exact prefix equals by design (health needed its own
_OPEN_EXACT entry); the new ops + worker routes are exact equals, so they were
still license-gated. Add them to _OPEN_EXACT — worker probes keep their own
X-Worker-Token guard.
- app/auth.py +10 -1
app/auth.py
CHANGED
|
@@ -145,7 +145,16 @@ _OPEN_PREFIXES = (
|
|
| 145 |
"/redoc",
|
| 146 |
"/openapi.json",
|
| 147 |
)
|
| 148 |
-
_OPEN_EXACT = frozenset(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
|
| 151 |
def _is_open_path(path: str) -> bool:
|
|
|
|
| 145 |
"/redoc",
|
| 146 |
"/openapi.json",
|
| 147 |
)
|
| 148 |
+
_OPEN_EXACT = frozenset(
|
| 149 |
+
{
|
| 150 |
+
"/",
|
| 151 |
+
"/api/v1/health",
|
| 152 |
+
"/api/health",
|
| 153 |
+
"/api/v1/engine/status",
|
| 154 |
+
"/api/v1/metrics/inference",
|
| 155 |
+
"/api/v1/smtp/probe",
|
| 156 |
+
}
|
| 157 |
+
)
|
| 158 |
|
| 159 |
|
| 160 |
def _is_open_path(path: str) -> bool:
|