Skip to content

Multiple Access-Control-Allow-Origin Headers #115

@m-schreiber

Description

@m-schreiber

Hi There,
just hit a Problem - would be nice if you could implement it.

Multiple "Access-Control-Allow-Origin"-Headers are not allowed:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMultipleAllowOriginNotAllowed

Instead of

foreach($allowedOrigin as $allowed_origin) { // to support multiple origins
	header("Access-Control-Allow-Origin: $allowed_origin");
}

do

header("Access-Control-Allow-Origin: ".implode(", ",$allowed_origin);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions