Giter Site home page Giter Site logo

Comments (6)

exodus4d avatar exodus4d commented on May 17, 2024

Thanks for reporting! Ill check.

from pathfinder.

IvandaNothabeer avatar IvandaNothabeer commented on May 17, 2024

Try ....

static function getIGBHeaderData(){
    $data = (object) [];
    $data->trusted = false;
    $data->values = [];
    $headerData = apache_request_headers();

    foreach($headerData as $key => $value){
        $key = strtolower($key);
        $key = str_replace('eve_', 'eve-', $key);

        if (strpos($key, 'eve-') === 0) {
            $key = str_replace('eve-', '', $key);                
            if (
                $key === 'trusted' &&
                $value === 'Yes'
            ) {
                $data->trusted = true;
            }

            $data->values[$key] = $value;
        }
    }

    return $data;
}

from pathfinder.

exodus4d avatar exodus4d commented on May 17, 2024

Thx for reporting I'll check and fix this in v0.0.10

Ivanda Nothabeer [email protected] schrieb am Di., 15. Sep. 2015
01:51:

Try ....

static function getIGBHeaderData(){
$data = (object) [];
$data->trusted = false;
$data->values = [];
$headerData = apache_request_headers();

foreach($headerData as $key => $value){
    $key = strtolower($key);
    $key = str_replace('eve_', 'eve-', $key);

    if (strpos($key, 'eve-') === 0) {
        $key = str_replace('eve-', '', $key);
        if (
            $key === 'trusted' &&
            $value === 'Yes'
        ) {
            $data->trusted = true;
        }

        $data->values[$key] = $value;
    }
}

return $data;

}

β€”
Reply to this email directly or view it on GitHub
#19 (comment).

from pathfinder.

mglinski avatar mglinski commented on May 17, 2024

Using apache_request_headers() will fail on some setups. It's better to look through the $_SERVER superglobal as any extra headers are passed in there by default on apache, and any FCGI setup will expose its added variables there too.

from pathfinder.

exodus4d avatar exodus4d commented on May 17, 2024

Issue should be fixed in v0.0.10.

For some reason, there are no custom CCP Header data in $_SERVER (local xampp @ Win). I guess it has something to do with:

I canΒ΄t find any clean solution for the problem, just ugly mod_rewrite rules and implementations that mix up $_SERVER and apache_request_headers(). For now we stick to apache_request_headers()

from pathfinder.

mglinski avatar mglinski commented on May 17, 2024

Just do detection when trying to read the headers and if none match, fall back to apache_request_headers().

On NGINX I inject the headers into $_SERVER via fcgi_variables, so this will work correctly on nginx regardless.

from pathfinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.