mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-04 22:43:40 +01:00
allow pihole requests to be proxied
This commit is contained in:
parent
d4908d34fb
commit
8cbead1703
@ -7,7 +7,13 @@ export default function Pihole({ service }) {
|
||||
const config = service.widget;
|
||||
|
||||
function buildApiUrl(endpoint) {
|
||||
const { url } = config;
|
||||
const { url, proxy } = config;
|
||||
|
||||
if (proxy) {
|
||||
const fullUrl = `${url}/admin/${endpoint}`;
|
||||
return "/api/proxy?url=" + encodeURIComponent(fullUrl);
|
||||
}
|
||||
|
||||
return `${url}/admin/${endpoint}`;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user