Backend: Add CORS preflight caching headers in Ktor server

Open Beginner friendly
#63 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
kotlin
Domain
api, backend

Research direction

Find the Ktor server CORS plugin configuration and the existing server tests for OPTIONS requests. Set maxAgeInSeconds to 86400, then add a test that checks the Access-Control-Max-Age response header; the issue is done when the test passes and the header is present.

Written by the indexing model from the issue text.

Description

enhancement
Summary

Currently, Ktor server responds to preflight OPTIONS requests without Access-Control-Max-Age. Add preflight caching to reduce unnecessary round-trip latency for web/desktop clients.

Acceptance Criteria
  • Configure maxAgeInSeconds = 86400 (24 hours) in Ktor CORS plugin.
  • Add test asserting Access-Control-Max-Age header on OPTIONS requests.
Dominant language
Kotlin
Stars
1
Forks
0
Avg merge
4m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developmentwithyash/yaan

All issues in developmentwithyash/yaan

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.