Title: No support for PATCH
Last modified: January 16, 2024

---

# No support for PATCH

 *  Resolved [oyvindwe](https://wordpress.org/support/users/oyvindwe/)
 * (@oyvindwe)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/)
 * Another issue with version 1.2.2:
 * The plugin does not allow PATCH as method (not possible to select in UI). Also,
   the commas should be be followed by space (” “)
 * Default value:
 *     ```wp-block-code
       access-control-allow-methods: OPTIONS, GET, POST, PUT, PATCH, DELETE
       ```
   
 * With plugin enabled:
 *     ```wp-block-code
       access-control-allow-methods: GET,POST,OPTIONS,PUT,DELETE
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Dev Kabir](https://wordpress.org/support/users/devkabir/)
 * (@devkabir)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17347274)
 * Have you tested these options after adding space? Could you please provide a 
   relevant source link so that anyone can review your suggestion?
 *  Thread Starter [oyvindwe](https://wordpress.org/support/users/oyvindwe/)
 * (@oyvindwe)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17347361)
 * I can try to make a PR. Is there a git repo for the plugin code, or is it only
   available on the Subversion repo?
 *  Plugin Author [Dev Kabir](https://wordpress.org/support/users/devkabir/)
 * (@devkabir)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17347478)
 * It is only available on the Subversion repository.
 * **_“No support for PATCH.”_**
 * At this moment, most users of this plugin are utilizing it for GET, POST, and
   OPTIONS methods. If any 5 user, like yourself, opens or adds a thread to enable
   the PATCH method, I will include that in the next update.
 * **_“Commas should be followed by a space (” “).”_**
 * If you could explain or add a relevant resource link discussing the pros and 
   cons of this, I would be grateful to you.
 *  Thread Starter [oyvindwe](https://wordpress.org/support/users/oyvindwe/)
 * (@oyvindwe)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17348840)
 * My main goal is to be able to restrict `Access-Control-Allow-Origin` for `/wp-
   json` and keep the other headers as is. This requires a plugin, and this one 
   looks very nice, so I would be very happy to use it instead of writing my own.
 * Without this installed plugin, I get this header (as posted above) for `/wp-json`:
 *     ```wp-block-code
       access-control-allow-methods: OPTIONS, GET, POST, PUT, PATCH, DELETE
       ```
   
 * I would like to retain the value. I actually don’t know if PATCH is in use or
   not, I’m not that familiar with the WordPress REST API.
 * > It is only available on the Subversion repository.
   > **_“No support for PATCH.”_**
   > At this moment, most users of this plugin are utilizing it for GET, POST, and
   > OPTIONS methods. If any 5 user, like yourself, opens or adds a thread to enable
   > the PATCH method, I will include that in the next update.
 * OK – I tried to add “PATCH” to both the Javascript and PHP files, but I wasn’t
   able to make it appear in the admin UI.
 * > **_“Commas should be followed by a space (” “).”_**
   > If you could explain or add a relevant resource link discussing the pros and
   > cons of this, I would be grateful to you.
 * Space is optional according to the spec, but improves readability. The plugin
   actually uses spaces in `Access-Control-Allow-Headers`
 * > `Access-Control-Allow-Methods = #[method](https://httpwg.org/specs/rfc9110.html#method.overview)`
   > `
   > Access-Control-Allow-Headers = #[field-name](https://httpwg.org/specs/rfc9110.html#fields.names)`
   >  [https://fetch.spec.whatwg.org/#http-new-header-syntax](https://fetch.spec.whatwg.org/#http-new-header-syntax)
 * > #rule
   > A construct “#” is defined, similar to “*”, for defining lists of elements.
   > The full form is “<n>#<m>element” indicating at least <n> and at most <m> elements,
   > each separated by one or more commas (“,”) and OPTIONAL linear white space (
   > LWS).
   >  [https://datatracker.ietf.org/doc/html/rfc2616#section-2.1](https://datatracker.ietf.org/doc/html/rfc2616#section-2.1)
 *  Plugin Author [Dev Kabir](https://wordpress.org/support/users/devkabir/)
 * (@devkabir)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17349453)
 * Thank you for providing detailed information.
 * > My main goal is to be able to restrict `Access-Control-Allow-Origin` for `/
   > wp-json` and keep the other headers as is.
 * I believe plugin is well-equipped to achieve this goal effectively.
 * >  I actually don’t know if PATCH is in use or not, I’m not that familiar with
   > the WordPress REST API.
 * Typically, the majority of requests involve GET and POST methods, with OPTIONS
   commonly employed for pre-flight requests. But as I promised you before,
 * >  If any 5 user, like yourself, opens or adds a thread to enable the PATCH method,
   > I will include that in the next update.
 * Because,
 * There are five extended versions of this plugin available outside the official
   repository, each tailored to meet specific client requirements. The versions 
   outside the repository cater to more advanced needs. However, **This plugin is
   designed as a basic solution, primarily targeting non-tech-savvy users seeking
   a straightforward CORS resolution.**
 * **Considering your technical expertise**, I believe you have the capability to
   address any security concerns that may arise, a proficiency that might surpass
   the typical user of this plugin. Many users of the basic version may not possess
   the same technical know-how.
 * If you have any specific security considerations or if there’s anything you’d
   like assistance with, please feel free to share. Your insights are valuable in
   enhancing the overall user experience.
 * > Space is optional according to the spec, but improves readability.
 * It’s important to note that the options’ reader is the server, and in this context,
   I don’t foresee any noticeable performance improvement with the inclusion of 
   spaces.
 * > The plugin actually uses spaces in `Access-Control-Allow-Headers`
 * I will remove space in next update.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘No support for PATCH’ is closed to new replies.

 * ![](https://ps.w.org/enable-cors/assets/icon-256x256.png?rev=2889819)
 * [Enable CORS](https://wordpress.org/plugins/enable-cors/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-cors/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-cors/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-cors/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-cors/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-cors/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Dev Kabir](https://wordpress.org/support/users/devkabir/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/no-support-for-patch/#post-17349453)
 * Status: resolved