# HTTP delete CORS issue using tokens

**URL:** https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322
**Category:** Development
**Created:** [11월 1, 2016, 8:28오후 UTC](https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322 "2016-11-01T20:28:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![david\_dav](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@david\_dav](https://meta.discourse.org/u/david_dav)
#### Post date: [11월 1, 2016, 8:28오후 UTC](https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322/1 "2016-11-01T20:28:16Z")

</div>

Receiving `Method DELETE is not allowed by Access-Control-Allow-Methods in preflight response.` when trying to `unlike` a post. My PUT, POST, and GET calls are working via the discourse API using tokens. Anybody run into this?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11월 2, 2016, 3:20오전 UTC](https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322/2 "2016-11-02T03:20:01Z")

</div>

Is this on latest, have a look at the full sequence in chrome dev tools, are we explicitly disallowing DELETE?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [11월 2, 2016, 4:29오전 UTC](https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322/3 "2016-11-02T04:29:53Z")

</div>

> [@sam](#):
>
> are we explicitly disallowing DELETE?

Looking in Network it doesn’t look that way.  
I just Liked and then ninja unLiked your post.

Like

```plaintext
Request URL:https://meta.discourse.org/post_actions
Request Method:POST
Status Code:200 

```

unLike

```plaintext
Request URL:https://meta.discourse.org/post_actions/233725
Request Method:DELETE
Status Code:200 

```

---

<div class="post-metadata">

### Author: ![david\_dav](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@david\_dav](https://meta.discourse.org/u/david_dav)
#### Post date: [11월 2, 2016, 1:12오후 UTC](https://meta.discourse.org/t/http-delete-cors-issue-using-tokens/52322/4 "2016-11-02T13:12:55Z")

</div>

We are using the latest hosted version and authentication via token. We are accessing via API endpoints.

```plaintext
Request URL:https://example.com/post_actions/264?api_key=<key>&api_username=Testddd-dev-5369&post_action_type_id=2
Request Method:OPTIONS
Status Code:200 
Remote Address:55.55.55.55:443 <fake ip>
:authority:example.com
:method:OPTIONS
:path:/post_actions/264?api_key=<key>&api_username=Testddd-dev-5369&post_action_type_id=2
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, sdch, br
accept-language:en-US,en;q=0.8
access-control-request-headers:x-http-method-override
access-control-request-method:DELETE
dnt:1
origin:http://localhost:3000
referer:http://localhost:3000/thread-details/202
user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1

```
