mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(federation): 🐛 Use explicit header object destructuring in inbox processing
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 0s
Build Docker Images / lint (push) Failing after 6s
Build Docker Images / check (push) Failing after 6s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 0s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 1s
Nix Build / check (push) Failing after 1s
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 0s
Build Docker Images / lint (push) Failing after 6s
Build Docker Images / check (push) Failing after 6s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 0s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 1s
Nix Build / check (push) Failing after 1s
This commit is contained in:
parent
6edb0310d8
commit
85ef96fc7f
|
|
@ -33,10 +33,21 @@ export default apiRoute((app) =>
|
||||||
),
|
),
|
||||||
async (context) => {
|
async (context) => {
|
||||||
const body = await context.req.valid("json");
|
const body = await context.req.valid("json");
|
||||||
|
const {
|
||||||
|
"versia-signature": signature,
|
||||||
|
"versia-signed-at": signedAt,
|
||||||
|
"versia-signed-by": signedBy,
|
||||||
|
authorization,
|
||||||
|
} = context.req.valid("header");
|
||||||
|
|
||||||
await inboxQueue.add(InboxJobType.ProcessEntity, {
|
await inboxQueue.add(InboxJobType.ProcessEntity, {
|
||||||
data: body,
|
data: body,
|
||||||
headers: context.req.valid("header"),
|
headers: {
|
||||||
|
"versia-signature": signature,
|
||||||
|
"versia-signed-at": signedAt,
|
||||||
|
"versia-signed-by": signedBy,
|
||||||
|
authorization,
|
||||||
|
},
|
||||||
request: {
|
request: {
|
||||||
body: await context.req.text(),
|
body: await context.req.text(),
|
||||||
method: context.req.method,
|
method: context.req.method,
|
||||||
|
|
|
||||||
|
|
@ -90,10 +90,21 @@ export default apiRoute((app) =>
|
||||||
validator("json", z.any(), handleZodError),
|
validator("json", z.any(), handleZodError),
|
||||||
async (context) => {
|
async (context) => {
|
||||||
const body: JSONObject = await context.req.valid("json");
|
const body: JSONObject = await context.req.valid("json");
|
||||||
|
const {
|
||||||
|
"versia-signature": signature,
|
||||||
|
"versia-signed-at": signedAt,
|
||||||
|
"versia-signed-by": signedBy,
|
||||||
|
authorization,
|
||||||
|
} = context.req.valid("header");
|
||||||
|
|
||||||
await inboxQueue.add(InboxJobType.ProcessEntity, {
|
await inboxQueue.add(InboxJobType.ProcessEntity, {
|
||||||
data: body,
|
data: body,
|
||||||
headers: context.req.valid("header"),
|
headers: {
|
||||||
|
"versia-signature": signature,
|
||||||
|
"versia-signed-at": signedAt,
|
||||||
|
"versia-signed-by": signedBy,
|
||||||
|
authorization,
|
||||||
|
},
|
||||||
request: {
|
request: {
|
||||||
body: await context.req.text(),
|
body: await context.req.text(),
|
||||||
method: context.req.method,
|
method: context.req.method,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue