configureAllowedMethods example

return $this->addPreflightRequestHeaders($response$request);
    }

    public function addPreflightRequestHeaders(Response $response, Request $request): Response
    {
        $this->configureAllowedOrigin($response$request);

        if ($response->headers->has('Access-Control-Allow-Origin')) {
            $this->configureAllowCredentials($response$request);

            $this->configureAllowedMethods($response$request);

            $this->configureAllowedHeaders($response$request);

            $this->configureMaxAge($response$request);
        }

        return $response;
    }

    public function isOriginAllowed(Request $request): bool
    {
        
Home | Imprint | This part of the site doesn't use cookies.