Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
b518c35e
Commit
b518c35e
authored
2 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
fix(server): Ap inboxの最大ペイロードサイズを256kbに制限
parent
94b1c99c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/backend/src/server/ActivityPubServerService.ts
+3
-4
3 additions, 4 deletions
packages/backend/src/server/ActivityPubServerService.ts
with
4 additions
and
4 deletions
CHANGELOG.md
+
1
−
0
View file @
b518c35e
...
...
@@ -42,6 +42,7 @@ You should also include the user name that made the change.
-
Server: Bug fix for Pinned Users lookup on instance @squidicuzz
-
Server: Fix peers API returning suspended instances @ineffyble
-
Server: trim long text of note from ap @syuilo
-
Server: Ap inboxの最大ペイロードサイズを256kbに制限 @syuilo
-
Client: case insensitive emoji search @saschanaz
-
Client: InAppウィンドウが操作できなくなることがあるのを修正 @tamaina
-
Client: use proxied image for instance icon @syuilo
...
...
This diff is collapsed.
Click to expand it.
packages/backend/src/server/ActivityPubServerService.ts
+
3
−
4
View file @
b518c35e
...
...
@@ -88,7 +88,6 @@ export class ActivityPubServerService {
@
bindThis
private
inbox
(
request
:
FastifyRequest
,
reply
:
FastifyReply
)
{
let
signature
;
try
{
signature
=
httpSignature
.
parseRequest
(
request
.
raw
,
{
'
headers
'
:
[]
});
...
...
@@ -438,9 +437,9 @@ export class ActivityPubServerService {
fastify
.
addContentTypeParser
(
'
application/ld+json
'
,
{
parseAs
:
'
string
'
},
fastify
.
getDefaultJsonParser
(
'
ignore
'
,
'
ignore
'
));
//#region Routing
// inbox
fastify
.
post
(
'
/inbox
'
,
async
(
request
,
reply
)
=>
await
this
.
inbox
(
request
,
reply
));
fastify
.
post
(
'
/users/:user/inbox
'
,
async
(
request
,
reply
)
=>
await
this
.
inbox
(
request
,
reply
));
// inbox
(limit: 256kb)
fastify
.
post
(
'
/inbox
'
,
{
bodyLimit
:
1024
*
256
},
async
(
request
,
reply
)
=>
await
this
.
inbox
(
request
,
reply
));
fastify
.
post
(
'
/users/:user/inbox
'
,
{
bodyLimit
:
1024
*
256
},
async
(
request
,
reply
)
=>
await
this
.
inbox
(
request
,
reply
));
// note
fastify
.
get
<
{
Params
:
{
note
:
string
;
}
}
>
(
'
/notes/:note
'
,
{
constraints
:
{
apOrHtml
:
'
ap
'
}
},
async
(
request
,
reply
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment