WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 3 months ago

#43183 new enhancement

wp-comments-post.php endpoint support for OPTIONS

Reported by: drzraf Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords: reporter-feedback
Focuses: Cc:
PR Number:

Description

Under some circumstance we may need cross-posting from one domain to another (without the wp-json API).
At least lets preflight requests flow normally
https://github.com/WordPress/WordPress/pull/338

Attachments (1)

OPTIONS-wp-comments-post.patch (282 bytes) - added by drzraf 21 months ago.
patch v1

Download all attachments as: .zip

Change History (3)

#1 @earnjam
3 months ago

  • Keywords reporter-feedback added
  • Version 4.9.2 deleted

@drzraf Sorry for the delay in getting a response to this ticket.

I'm curious, why would you want to cross-post directly using wp-comments-post.php instead of using the REST API?

#2 @drzraf
3 months ago

I don't remember (not working on this project anymore). REST-API was still in early stage and I wanted to mimic (in AJAX) the traditional plain-form behavior as much as possible to avoid submission inconsistencies (esp' wrt to captcha, duplication detection & co).

Anyway, from a basic HTTP standard PoV, I still think OPTIONS requests should be replied to by WP.

Note: See TracTickets for help on using tickets.