Skip to content

feat: more security improvements (GraphQL controls, CORS warning, request timeouts)#14

Merged
deer merged 1 commit into
mainfrom
more_security
Apr 18, 2026
Merged

feat: more security improvements (GraphQL controls, CORS warning, request timeouts)#14
deer merged 1 commit into
mainfrom
more_security

Conversation

@deer

@deer deer commented Apr 18, 2026

Copy link
Copy Markdown
Owner
  • GraphQlOptions added with disableIntrospection(), maxDepth(int), and maxComplexity(int). GraphQlHandler.graphql() gains a second overload accepting options; introspection is blocked at request time (400), depth/complexity limits are wired via ChainedInstrumentation at schema build time.
  • CorsMiddleware.allowAll() annotated @Deprecated and emits a Logger.warn() at call time so misuse surfaces in IDE inspections and runtime logs.
  • RequestTimeout option added to serve-foundation. TimeoutExecutor (package-private in serve-transport-http) wraps the virtual-thread executor and schedules Thread::interrupt after the configured duration, protecting against Slowloris and hung handlers. New HttpTransport constructor overload accepts RequestTimeout; the scheduler is shut down in stop().

@deer deer merged commit e473866 into main Apr 18, 2026
2 checks passed
@deer deer deleted the more_security branch April 18, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant