revel: Route options not found

hello i have a problem route options not found in revel. im using vuejs with axios. image this is my code in file routes in revel `GET /posts PostController.Index

POST /posts PostController.Create

PUT /posts PostController.Update

GET /posts/:id PostController.Show

DELETE /posts/:id PostController.Delete`

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18

Most upvoted comments

Okay, great. Glad you found the issue. Have a good one.

OK, that looks correct. Can you verify that your routing is correct to the controller itself by adding output statements to the Options method? Either log them or console out is fine, just to ensure it’s making it to the Options method of your App controller. Also, in your web console under network, what does the request and response look like for a valid action using CORS? In otherwords, if you send a request to a method that exists in your App controller, say Ping() that writes out “Pong” or something. What does the request and response look like for CORS preflight OPTIONS request?