Commit Graph

4 Commits

Author SHA1 Message Date
b6763f7483 feat(handler): sanitize sensitive fields in form data
- Removes `username` and `apiKey` from form data to prevent errors
  from the LanguageTool server when these fields are present
- Updates test cases to reflect the new handling of form data bodies
2025-05-11 10:59:49 +02:00
4326a2d92c fix(auth): validate API key from POST body and handle content type
- Switch API key validation to use POST body parameters
- Add support for `application/x-www-form-urlencoded` content type
- Store parsed body in context state for further use
- Reject unsupported content types with 415 status
2025-05-11 10:59:39 +02:00
f9714cbb53 feat(proxy): add environment config and request handling
- Introduce environment-based configuration for proxy settings
- Add middleware for API key authentication
- Implement request forwarding to LanguageTool backend
- Set up server startup and routing logic
2025-05-11 01:10:54 +02:00
52ce172ef5 test(auth): add unit tests for ltProxyAuth and ltProxyHandler
- Add tests to validate ltProxyAuth behavior for valid, invalid, and missing API keys
- Add tests to verify ltProxyHandler correctly proxies requests and returns responses
2025-05-11 01:10:39 +02:00