mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
Validate provider response formats
CCTV frames and the Street View fallback accept only JPEG, PNG, GIF, WebP and AVIF, parsed from the media type essence and sent under the canonical type; any other type is cancelled and falls through to the next fallback as a failed upstream does. Live media must match its feed kind (video/mp4, video/webm, or multipart/x-mixed-replace with a boundary) before the camera is reported healthy or any byte is relayed, and its redirects now stay on the registered origin like frames. Every /api/cctv route uses the same-site gate. The GBFS proxy relays only bodies that parse as JSON, re-serialized under a fixed application/json type.
This commit is contained in:
1 parent
72e1469968
commit
0ad75095a7
7 files changed
+468
-33
No files matched your search
@@ -194,6 +194,8 @@
|
||||
"exports": ["./server/providers/cctv"],
|
||||
"modules": [
|
||||
"server/providers/cctv.js",
|
||||
"server/providers/common/same-site.js",
|
||||
"src/localRequestGate.mjs",
|
||||
"server/providers/cctv/cap.js",
|
||||
"server/providers/cctv/groundHeights.js",
|
||||
"server/providers/cctv/catalog.js",
|
||||
|
||||
Reference in new issue
Block a user