mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 05:53:40 +01:00

* Restrict emby endpoints and proxy segments * Dont allow path traversal in segments * Restrict qbittorrent proxy endpoints * Restrict npm proxy endpoints * Restrict flood proxy endpoints * Restrict tdarr proxy endpoints * Restrict xteve proxy endpoints * Restrict transmission proxy endpoints * disallow non-mapped endpoints this change drops all requests that have un-mapped endpoint queries allowedEndpoints is added as a method to pass proxy requests via a regex on the endpoint most widgets with custom proxies use either no endpoint, or a static one Co-Authored-By: Ben Phelps <ben@phelps.io>
28 lines
573 B
JavaScript
28 lines
573 B
JavaScript
import genericProxyHandler from "utils/proxy/handlers/generic";
|
|
|
|
const widget = {
|
|
api: "{url}/emby/{endpoint}?api_key={key}",
|
|
proxyHandler: genericProxyHandler,
|
|
|
|
mappings: {
|
|
Sessions: {
|
|
endpoint: "Sessions",
|
|
},
|
|
Count: {
|
|
endpoint: "Items/Counts",
|
|
},
|
|
Unpause: {
|
|
method: "POST",
|
|
endpoint: "Sessions/{sessionId}/Playing/Unpause",
|
|
segments: ["sessionId"],
|
|
},
|
|
Pause: {
|
|
method: "POST",
|
|
endpoint: "Sessions/{sessionId}/Playing/Pause",
|
|
segments: ["sessionId"],
|
|
},
|
|
},
|
|
};
|
|
|
|
export default widget;
|