Skip to content

PHP CORS Proxy #1546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Only consider the content length header when it's not a GET request
  • Loading branch information
adamziel committed Jul 11, 2024
commit b8c16c47e4e78b937656796df9476fb2a49a605a
2 changes: 1 addition & 1 deletion packages/playground/website-cors-proxy/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function set_cors_headers() {
exit;
}

if ($_SERVER['CONTENT_LENGTH'] >= MAX_REQUEST_SIZE) {
if ($_SERVER['REQUEST_METHOD'] !== 'GET' && $_SERVER['CONTENT_LENGTH'] >= MAX_REQUEST_SIZE) {
http_response_code(413);
echo "Request Entity Too Large";
exit;
Expand Down
Loading