mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Compare commits
6 Commits
a4a8e70d25
...
0a83b2100f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a83b2100f | ||
|
|
78b73e8166 | ||
|
|
547ef0c4c5 | ||
|
|
11d148fff0 | ||
|
|
eb61d69626 | ||
|
|
876304cda5 |
6
.github/workflows/docker-publish.yml
vendored
6
.github/workflows/docker-publish.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|||||||
6
.github/workflows/docs-publish.yml
vendored
6
.github/workflows/docs-publish.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Install python
|
- name: Install python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- name: Check files
|
- name: Check files
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- pre-commit
|
- pre-commit
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- run: echo "cache_id=${{github.sha}}" >> $GITHUB_ENV
|
- run: echo "cache_id=${{github.sha}}" >> $GITHUB_ENV
|
||||||
|
|||||||
8
.github/workflows/repo-maintenance.yml
vendored
8
.github/workflows/repo-maintenance.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
name: 'Stale'
|
name: 'Stale'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v10
|
||||||
with:
|
with:
|
||||||
days-before-stale: 7
|
days-before-stale: 7
|
||||||
days-before-close: 14
|
days-before-close: 14
|
||||||
@@ -57,7 +57,7 @@ jobs:
|
|||||||
name: 'Close Answered Discussions'
|
name: 'Close Answered Discussions'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v7
|
- uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
function sleep(ms) {
|
function sleep(ms) {
|
||||||
@@ -113,7 +113,7 @@ jobs:
|
|||||||
name: 'Close Outdated Discussions'
|
name: 'Close Outdated Discussions'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v7
|
- uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
function sleep(ms) {
|
function sleep(ms) {
|
||||||
@@ -204,7 +204,7 @@ jobs:
|
|||||||
name: 'Close Unsupported Feature Requests'
|
name: 'Close Unsupported Feature Requests'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v7
|
- uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
function sleep(ms) {
|
function sleep(ms) {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import widgets from "widgets/widgets";
|
|||||||
|
|
||||||
const logger = createLogger("credentialedProxyHandler");
|
const logger = createLogger("credentialedProxyHandler");
|
||||||
|
|
||||||
|
function basicAuthHeader(widget) {
|
||||||
|
return `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
||||||
|
}
|
||||||
|
|
||||||
export default async function credentialedProxyHandler(req, res, map) {
|
export default async function credentialedProxyHandler(req, res, map) {
|
||||||
const { group, service, endpoint, index } = req.query;
|
const { group, service, endpoint, index } = req.query;
|
||||||
|
|
||||||
@@ -61,7 +65,7 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||||||
if (widget.key) {
|
if (widget.key) {
|
||||||
headers.Authorization = `Bearer ${widget.key}`;
|
headers.Authorization = `Bearer ${widget.key}`;
|
||||||
} else {
|
} else {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
}
|
}
|
||||||
} else if (widget.type === "proxmox") {
|
} else if (widget.type === "proxmox") {
|
||||||
headers.Authorization = `PVEAPIToken=${widget.username}=${widget.password}`;
|
headers.Authorization = `PVEAPIToken=${widget.username}=${widget.password}`;
|
||||||
@@ -78,31 +82,31 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||||||
if (widget.key) {
|
if (widget.key) {
|
||||||
headers["NC-Token"] = `${widget.key}`;
|
headers["NC-Token"] = `${widget.key}`;
|
||||||
} else {
|
} else {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
}
|
}
|
||||||
} else if (widget.type === "paperlessngx") {
|
} else if (widget.type === "paperlessngx") {
|
||||||
if (widget.key) {
|
if (widget.key) {
|
||||||
headers.Authorization = `Token ${widget.key}`;
|
headers.Authorization = `Token ${widget.key}`;
|
||||||
} else {
|
} else {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
}
|
}
|
||||||
} else if (widget.type === "azuredevops") {
|
} else if (widget.type === "azuredevops") {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`$:${widget.key}`).toString("base64")}`;
|
headers.Authorization = `Basic ${Buffer.from(`$:${widget.key}`).toString("base64")}`;
|
||||||
} else if (widget.type === "glances") {
|
} else if (widget.type === "glances") {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
} else if (widget.type === "plantit") {
|
} else if (widget.type === "plantit") {
|
||||||
headers.Key = `${widget.key}`;
|
headers.Key = `${widget.key}`;
|
||||||
} else if (widget.type === "myspeed") {
|
} else if (widget.type === "myspeed") {
|
||||||
headers.Password = `${widget.password}`;
|
headers.Password = `${widget.password}`;
|
||||||
} else if (widget.type === "esphome") {
|
} else if (widget.type === "esphome") {
|
||||||
if (widget.username && widget.password) {
|
if (widget.username && widget.password) {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
} else if (widget.key) {
|
} else if (widget.key) {
|
||||||
headers.Cookie = `authenticated=${widget.key}`;
|
headers.Cookie = `authenticated=${widget.key}`;
|
||||||
}
|
}
|
||||||
} else if (widget.type === "wgeasy") {
|
} else if (widget.type === "wgeasy") {
|
||||||
if (widget.username && widget.password) {
|
if (widget.username && widget.password) {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = basicAuthHeader(widget);
|
||||||
} else {
|
} else {
|
||||||
headers.Authorization = widget.password;
|
headers.Authorization = widget.password;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user