Posts

Showing posts from February 4, 2019

how to use the puppetdb API to combine facts

Image
0 I'm using puppet version 5.3.6. I'm able to query the puppetdb and get lots of useful information like this: $ curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode 'query=["extract", [["function","count"],"value"],["=","name","operatingsystem"],["group_by", "value"]]' | python -mjson.tool [ { "count": 339, "value": "OracleLinux" }, { "count": 73, "value": "RedHat" } ] AND: $ curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode 'query=["extract", [["function","count"],"value"],["=","name&

Libwebsockets API - How to add “Access-Control-Allow-Origin: *”

Image
0 How can I add "Access-Control-Allow-Origin" to an HTTP response header. I use libwebsockets API. Can somebody provide me a sample? Thanks libwebsockets share | improve this question asked Nov 21 '18 at 14:45 labinator labinator 1 2 add a comment  |  0