Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

POST/PUT/DELETE -> Forbidden #53

Closed
panos-kosmidis opened this Issue · 3 comments

2 participants

@panos-kosmidis

Hello, POST/PUT/DELETE always return Forbidden, GET methods works fine... I tried to use the example

exports.index = (req, res) ->
  res.send "forum index"

exports["new"] = (req, res) ->
  res.send "new forum"

exports.create = (req, res) ->
  res.send "create forum"

exports.show = (req, res) ->
  res.send "show forum " + req.params.api

exports.edit = (req, res) ->
  res.send "edit forum " + req.params.api

exports.update = (req, res) ->
  res.send "update forum " + req.params.api

exports.destroy = (req, res) ->
  res.send "destroy forum " + req.params.api

I used api resource name instead of forum for my test

So index,new,show,edit worked fine but create,update,destroy throw me Forbidden :/

@panos-kosmidis

Ok... it was because of csrf D A M N ! so many hours lost :P

@tj
Owner
tj commented

hahaha perhaps in development we should log a warning :D

@panos-kosmidis

or perhaps I need to go to bed because it is already 3:50am :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.