mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
fix: increased body size limit, added config option (#3011)
This commit is contained in:
@@ -210,12 +210,9 @@ export default (ctx: GraphContext) => ({
|
||||
}).then(primeStoriesFromConnection(ctx)),
|
||||
debugScrapeMetadata: new DataLoader(
|
||||
createManyBatchLoadFn((url: string) =>
|
||||
// This typecast is needed because the custom `ms` format does not return
|
||||
// the desired `number` type even though that's the only type it can
|
||||
// output.
|
||||
scraper.scrape({
|
||||
url,
|
||||
timeout: (ctx.config.get("scrape_timeout") as unknown) as number,
|
||||
timeout: ctx.config.get("scrape_timeout"),
|
||||
size: ctx.config.get("scrape_max_response_size"),
|
||||
customUserAgent: ctx.tenant.stories.scraping.customUserAgent,
|
||||
proxyURL: ctx.tenant.stories.scraping.proxyURL,
|
||||
|
||||
@@ -18,11 +18,9 @@ export const LiveConfiguration: GQLLiveConfigurationTypeResolver<LiveConfigurati
|
||||
return false;
|
||||
}
|
||||
|
||||
// This typecast is needed because the custom `ms` format does not return the
|
||||
// desired `number` type even though that's the only type it can output.
|
||||
const disableLiveUpdatesTimeout = (ctx.config.get(
|
||||
const disableLiveUpdatesTimeout = ctx.config.get(
|
||||
"disable_live_updates_timeout"
|
||||
) as unknown) as number;
|
||||
);
|
||||
if (disableLiveUpdatesTimeout > 0) {
|
||||
// If one of these is available, use it to determine the time since the
|
||||
// last comment.
|
||||
|
||||
@@ -259,11 +259,7 @@ export function createSubscriptionServer(
|
||||
schema: GraphQLSchema,
|
||||
options: Options
|
||||
) {
|
||||
// This typecast is needed because the custom `ms` format does not return the
|
||||
// desired `number` type even though that's the only type it can output.
|
||||
const keepAlive = (options.config.get(
|
||||
"websocket_keep_alive_timeout"
|
||||
) as unknown) as number;
|
||||
const keepAlive = options.config.get("websocket_keep_alive_timeout");
|
||||
|
||||
return SubscriptionServer.create(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user