Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
el3ab-Player
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
el3ab-Player
Commits
ed5f1c6c
Commit
ed5f1c6c
authored
Jun 03, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Authorization header passthrough for Apache CGI
Co-Authored-By:
Claude Opus 4.6
<
noreply@anthropic.com
>
parent
4d7736a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
.htaccess
.htaccess
+3
-0
auth.php
includes/auth.php
+5
-1
No files found.
.htaccess
View file @
ed5f1c6c
RewriteEngine
On
# Pass Authorization header to PHP
SetEnvIf
Authorization "(.*)" HTTP_AUTHORIZATION=$1
# Serve existing files/dirs directly
RewriteCond
%{REQUEST_URI} ^/public/ [OR]
RewriteCond
%{REQUEST_URI} ^/api/
...
...
includes/auth.php
View file @
ed5f1c6c
...
...
@@ -3,7 +3,11 @@
require_once
__DIR__
.
'/../config/constants.php'
;
function
getAuthToken
()
:
?
string
{
$header
=
$_SERVER
[
'HTTP_AUTHORIZATION'
]
??
''
;
$header
=
$_SERVER
[
'HTTP_AUTHORIZATION'
]
??
$_SERVER
[
'REDIRECT_HTTP_AUTHORIZATION'
]
??
''
;
if
(
empty
(
$header
)
&&
function_exists
(
'getallheaders'
))
{
$headers
=
getallheaders
();
$header
=
$headers
[
'Authorization'
]
??
$headers
[
'authorization'
]
??
''
;
}
if
(
preg_match
(
'/Bearer\s+(.+)/i'
,
$header
,
$m
))
{
return
$m
[
1
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment