-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Oct 25, 2022
1 parent
2e6544f
commit 5cb2974
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
require_once("./lib/PonderSource/AS4.php"); | ||
if ($_SERVER["REQUEST_METHOD"] == 'POST') { | ||
error_log("Hi"); | ||
$as4 = new \OCA\PeppolNext\PonderSource\AS4(); | ||
$contentType = "unknown"; | ||
$headers = apache_request_headers(); | ||
foreach ($headers as $header => $value) { | ||
if (strtolower($header) == "content-type") { | ||
$contentType = $value; | ||
} | ||
error_log("[INCOMING HEADER] $header: $value"); | ||
} | ||
error_log("[CONTENT-TYPE] $contentType"); | ||
$body = file_get_contents('php://input'); | ||
error_log("[REQUEST BODY LENGTH] " . strlen($body)); | ||
$response = $as4->handleAs4($contentType, $body); | ||
error_log("[RESPONSE BODY LENGTH] " . strlen($response)); | ||
header('Referrer-Policy: strict-origin-when-cross-origin'); | ||
header('X-Frame-Options: SAMEORIGIN'); | ||
header('X-Content-Type-Options: nosniff'); | ||
header('X-XSS-Protection: 1; mode=block'); | ||
header('Strict-Transport-Security: max-age=3600;includeSubDomains'); | ||
header('Cache-Control: no-cache, no-store, must-revalidate, proxy-revalidate'); | ||
header('Content-Type: application/soap+xml;charset=utf-8'); | ||
header('Content-Disposition:'); | ||
echo $response; | ||
} |