ep_markdown
ep_markdown copied to clipboard
Added support for the importExportRateLimiting setting, and Access-Control-Allow-Origin header added. Fixed the export of readonly pads.
As mentioned several times (#9, #30, #139), in order to use ep_markdown through the Etherpad API, we need to add the CORS headers to the request. The problem with only doing that, if I understood well, is that it exposes the server to DDOS attacks.
In order to circumvent the problem, the other import/export functionalities of Etherpad are capped through a variable set in the settings.json
file: importExportRateLimiting
. The implementation of this setting is done in the importexport.ts
file of etherpad-lite.
This PR aims at implementing this limiter alongside the CORS headers, in order to be able to use the export function of ep_markdown through the API.
It's been some time since I did this PR. I recently discovered that it was not possible to export pads in readonly mode, so I fixed it. If I could, I would have opened a new PR, but GitHub only allows one fork per project for the same user.