package org.zalando.pazuzu.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class CorsConfiguration {

    @Value("${pazuzu.registry.cors.allowedOrigins:}")
    private String allowedOrigins;

    @Bean
    public WebMvcConfigurer corsConfigurer() {
        return new WebMvcConfigurerAdapter() {
            @Override
            public void addCorsMappings(CorsRegistry registry) {
                registry.addMapping("/api/**").allowedOrigins(allowedOrigins);
            }
        };
    }
}

@@ -788,60 +788,182 @@
 stry
-.addMapping(%22/api/**%22).allowedOrigins(allowedOrigins
+%0A                        .addMapping(%22/api/**%22)%0A                        .allowedOrigins(allowedOrigins)%0A                        .allowedMethods(%22GET%22, %22PUT%22, %22POST%22, %22DELETE%22
 );%0A 

Set the allowed methods to all required ones.