mirror of
https://github.com/lukasbestle/projectr.git
synced 2026-10-11 23:10:19 +02:00
Minor improvements to the GitLab example script
This commit is contained in:
+2
-3
@@ -47,7 +47,7 @@ define('TOOLKIT_PATH', '/home/<user>/bin');
|
||||
* 9. Hit "Test Hook" in GitLab's settings interface. The project should be deployed a few seconds later.
|
||||
*
|
||||
* Troubleshooting:
|
||||
* - Use `cat <path to project>/logs/*.log`. This should tell you what went wrong.
|
||||
* - Use `tail -f <path to project>/logs/*.log`. This should tell you what went wrong.
|
||||
* - Check if the TOOLKIT_PATH you set above is correct.
|
||||
* - Check if you set the origin of your project to the correct URL.
|
||||
* - Open the web hook URL you entered in GitLab in your browser and check if the output is "Authenticated, but no POST body sent.".
|
||||
@@ -70,8 +70,7 @@ if(!isset($_GET['token']) || $_GET['token'] !== AUTH_TOKEN) {
|
||||
}
|
||||
|
||||
// Get the request body
|
||||
$inputPointer = fopen('php://input', 'r');
|
||||
$input = stream_get_contents($inputPointer);
|
||||
$input = file_get_contents('php://input');
|
||||
if(!$input) {
|
||||
http_response_code(405);
|
||||
die('Authenticated, but no POST body sent.');
|
||||
|
||||
Reference in New Issue
Block a user