Merge branch 'release/1.0.1'
This commit is contained in:
commit
735efcf4cb
@ -4,6 +4,12 @@ Tous les changements notables apportés à ce projet seront documentés dans ce
|
|||||||
Le format est basé sur [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/)
|
Le format est basé sur [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/)
|
||||||
et ce projet adhère à [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
et ce projet adhère à [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.1] - 2018-10-22
|
||||||
|
|
||||||
|
### Corrections
|
||||||
|
- Composer Installer auto-version SHA (thanks to @delcourq)
|
||||||
|
- Fix GraphQL endpoint to handle GET request
|
||||||
|
|
||||||
## [1.0.0] - 2018-04-24
|
## [1.0.0] - 2018-04-24
|
||||||
|
|
||||||
### Ajouts
|
### Ajouts
|
||||||
|
@ -2,7 +2,7 @@ FROM php
|
|||||||
MAINTAINER Conjecto <contact@conjecto.com>
|
MAINTAINER Conjecto <contact@conjecto.com>
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
--no-install-recommends git zip zlib1g-dev
|
--no-install-recommends git zip zlib1g-dev wget
|
||||||
|
|
||||||
RUN docker-php-ext-install -j$(nproc) zip
|
RUN docker-php-ext-install -j$(nproc) zip
|
||||||
|
|
||||||
@ -11,9 +11,11 @@ WORKDIR /var/app/
|
|||||||
|
|
||||||
# install composer
|
# install composer
|
||||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
RUN \
|
||||||
RUN php composer-setup.php
|
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && \
|
||||||
RUN php -r "unlink('composer-setup.php');"
|
php -r "if (hash_file('SHA384', 'composer-setup.php') === '${EXPECTED_SIGNATURE}') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
|
||||||
|
php composer-setup.php && \
|
||||||
|
php -r "unlink('composer-setup.php');"
|
||||||
|
|
||||||
# install vendors
|
# install vendors
|
||||||
RUN php composer.phar install
|
RUN php composer.phar install
|
||||||
|
@ -5,16 +5,24 @@ header('Access-Control-Allow-Credentials: true', true);
|
|||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header('Access-Control-Allow-Headers: Content-Type');
|
header('Access-Control-Allow-Headers: Content-Type');
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
|
$payload = null;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
switch($_SERVER['REQUEST_METHOD']) {
|
||||||
|
case "POST":
|
||||||
if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] === 'application/json') {
|
if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] === 'application/json') {
|
||||||
$rawBody = file_get_contents('php://input');
|
$rawBody = file_get_contents('php://input');
|
||||||
$requestData = json_decode($rawBody ?: '', true);
|
$requestData = json_decode($rawBody ?: '', true);
|
||||||
} else {
|
} else {
|
||||||
$requestData = $_POST;
|
$requestData = $_POST;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case "GET":
|
||||||
|
$requestData = $_GET;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$payload = isset($requestData['query']) ? $requestData['query'] : null;
|
$payload = isset($requestData['query']) ? $requestData['query'] : null;
|
||||||
|
|
||||||
require_once __DIR__.'/../vendor/autoload.php';
|
require_once __DIR__.'/../vendor/autoload.php';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user