Add support for CORS headers

Open
#14 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api

Research direction

Locate the XML-RPC server code containing returnErrorXml() and returnXml(), then trace how other responses are generated. Review the configuration pattern before deciding how CORS settings should be exposed. Done means configured CORS headers are included in all server responses, including errors and normal XML responses.

Written by the indexing model from the issue text.

Description

Many browsers will do CORS verification when issuing XHR requests to servers on a different origin. At the moment, the XML-RPC server is not replying with the necessary headers to allow CORS to be successful.

A suggestion would be to add a new configuration option to the server to set up CORS, and have the server output those headers in all responses.

In my hacked version here, I've forced the headers in both returnErrorXml() and returnXml() which is not ideal but solved it for my little experimentation.

Dominant language
JavaScript
Stars
67
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/xml-rpc

All issues in scripting/xml-rpc

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.