Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
enable CORS on fuelPHP
abarcenas
September 2014
I have a question in stackoverflow and I am thinking if there is a fuelphp issues in it ...
http://stackoverflow.com/questions/26051326/angular-405-error-on-http-request?noredirect=1#comment40812120_26051326
Basically, I am trying to access an API via AJAX with CORS, which I enabled based on APACHE
http://enable-cors.org/server_apache.html
My question, is I am getting a 405 error. I am not sure if there is something I need to do in the fuel side or is this in this something on the agnularjs side.
The code is in the stackoverflow link.
Harro
September 2014
Assuming you use Controller_Rest to create this functionality:
That returns a 405 status if it can't match the request to any method in the controller.
Again, assuming with a link like
http://event.chart.local/api/vendor/events.json
, your controller is Controller_Api_Vendor, and the method is "events"?
In that case, it will look for either options_events(), or action_events(). If one of these exist and is callable, the 405 is not generated by Fuel.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
September 2014