Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ifyour committed Nov 13, 2023
1 parent 9449745 commit e86b104
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,7 @@ 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
```
For this case, it can be solved using the [DeepL proxy server](https://github.com/ifyour/deepl-proxy), refer to Deploying to Cloudflare [Code](https://github.com/ifyour/deeplx-for-cloudflare).

## License

Expand Down

0 comments on commit e86b104

Please sign in to comment.