Skip to content

Commit

Permalink
doc: fix known issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ifyour committed Nov 13, 2023
1 parent 2f0cc2f commit 9449745
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ yarn run lint --fix

Based on current testing, Cloudflare and Cloudflare-based edge function runtimes (Vercel) are not able to correctly request the DeepL server, and a 525 error occurs, a detailed description of the issue can be found [here](https://github.com/cloudflare/workerd/issues/776).

For this case, it can be solved using the [DeepL proxy server](https://github.com/ifyour/deepl-proxy), refer to Deploying to Cloudflare Code:

```ts
import { Hono } from 'hono'
import { query } from '@ifyour/deeplx'

const app = new Hono()

app.post('/translate', async c => {
const params = await c.req.json()
const result = await query(params, { proxyEndpoint: 'https://ideepl.vercel.app/jsonrpc' })
return c.json(result, result.code)
})

export default app
```

## License

DeepLx is available under the MIT license.

0 comments on commit 9449745

Please sign in to comment.