Coder Social home page Coder Social logo

rest-daemon's Issues

Logging

Inject PSR-3 compatible logger.

Fix CORS headers

Send Access-Control-Allow-Headers and Access-Control-Allow-Methods with response when Access-Control-Request-Headers and Access-Control-Request-Method are presents.

CLI Application error on start

$ vendor/bin/rest-deamon 
PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Console\Application' not found in /home/samizdam/dev/projects/rest-daemon-uptime/vendor/free-elephants/rest-daemon/bin/rest-deamon:24
Stack trace:
#0 {main}
  thrown in /home/samizdam/dev/projects/rest-daemon-uptime/vendor/free-elephants/rest-daemon/bin/rest-deamon on line 24

Version installed via composer: 0.12, null of custom configuration, PHP version: 7.3.

How to handle HTTP OPTIONS preflight requests (CORS)?

I'm using DefaultBeforeMiddlewareCollection to add CORS header. But with an OPTIONS request the middleware don't get called at all.

Ratchet and Aerys seems not to handle OPTIONS requests by themselves. At least I haven't found a solution.

Providing an options handler for every endpoints seems to be a overkill.

Is there a solution for that?

Nested query params doesn't pasring corrent when use AERYS_HTTP_DRIVER

Affected version: 0.13.0.

Request example:
curl -g "http://127.0.0.1:9000/api/v0/exchanges?filter[post]=1,2&filter[author]=12"

Actual result:

array(2) {
  'filter[post]' =>
  array(1) {
    [0] =>
    string(3) "1,2"
  }
  'filter[author]' =>
  array(1) {
    [0] =>
    string(2) "12"
  }
}

Expected result:

array(1) {
  'filter' =>
  array(2) {
    'post' =>
    string(3) "1,2"
    'author' =>
    string(2) "12"
  }
}

Ratchet driver work fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.