Skip to content

Conversation

@yanntrividic
Copy link

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.

Pads in readonly mode weren't being exported due to a lack of conversion of the pad ID. It is now working.
@yanntrividic yanntrividic changed the title Added support for the importExportRateLimiting setting, and Access-Control-Allow-Origin header added. Added support for the importExportRateLimiting setting, and Access-Control-Allow-Origin header added. Fixed the export of readonly pads. Jul 4, 2024
@yanntrividic
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant