mirror of
https://github.com/sussy-code/sudo-proxy.git
synced 2026-07-28 14:02:45 +00:00
Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2349e50dbe | ||
|
|
46560bac90 | ||
|
|
d698358f64 | ||
|
|
4f6add4b0b | ||
|
|
2747795a0f | ||
|
|
0ffcbbbe05 | ||
|
|
8b35fbf648 | ||
|
|
77a0a2bc00 | ||
|
|
3a3fdaa747 |
8 changed files with 5814 additions and 2849 deletions
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Docker Publish
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
|
|
|
|||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Release
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
[build]
|
||||
command = "pnpm build:netlify"
|
||||
publish = "."
|
||||
edge_functions = ".netlify"
|
||||
publish = ".netlify"
|
||||
edge_functions = ".netlify/functions"
|
||||
[functions]
|
||||
directory = ".netlify/functions"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import pkg from "./package.json";
|
|||
//https://nitro.unjs.io/config
|
||||
export default defineNitroConfig({
|
||||
noPublicDir: true,
|
||||
compatibilityDate: "2025-04-20",
|
||||
srcDir: "./src",
|
||||
runtimeConfig: {
|
||||
version: pkg.version
|
||||
|
|
|
|||
22
package.json
22
package.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "simple-proxy",
|
||||
"private": true,
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.6",
|
||||
"scripts": {
|
||||
"prepare": "nitropack prepare",
|
||||
"dev": "nitropack dev",
|
||||
|
|
@ -16,19 +16,19 @@
|
|||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"dependencies": {
|
||||
"h3": "^1.10.0",
|
||||
"jose": "^5.2.0",
|
||||
"nitropack": "^2.8.1"
|
||||
"h3": "^1.15.1",
|
||||
"jose": "^5.10.0",
|
||||
"nitropack": "^2.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
||||
"@typescript-eslint/parser": "^6.7.0",
|
||||
"eslint": "^8.48.0",
|
||||
"@rollup/wasm-node": "^4.40.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"@rollup/wasm-node": "^4.9.4"
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-import-resolver-typescript": "^3.10.0",
|
||||
"eslint-plugin-prettier": "^5.2.6"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
|
|
|
|||
8619
pnpm-lock.yaml
8619
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -64,6 +64,7 @@ export function getAfterResponseHeaders(
|
|||
'Access-Control-Expose-Headers': '*',
|
||||
Vary: 'Origin',
|
||||
'X-Final-Destination': finalUrl,
|
||||
...output,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,16 @@ export async function specificProxyRequest(
|
|||
|
||||
const method = opts.fetchOptions?.method || event.method;
|
||||
const oldHeaders = getProxyRequestHeaders(event);
|
||||
|
||||
// netlify seems to be changing the content-encoding header to gzip when the reponse is encoded in zstd
|
||||
// so as temp fix just not sending zstd in accept encoding
|
||||
if (oldHeaders['accept-encoding']?.includes('zstd'))
|
||||
oldHeaders['accept-encoding'] = oldHeaders['accept-encoding']
|
||||
.split(',')
|
||||
.map((x: string) => x.trim())
|
||||
.filter((x: string) => x !== 'zstd')
|
||||
.join(', ');
|
||||
|
||||
opts.blacklistedHeaders?.forEach((header) => {
|
||||
const keys = Object.keys(oldHeaders).filter(
|
||||
(v) => v.toLowerCase() === header.toLowerCase(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue