list of cors headers for https code example
Example 1: list of cors headers for https
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedOrigins("*")
.allowedMethods("GET", "PUT", "POST", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("Content-Type", "api_key", "Authorization", "X-Requested-With");
}
Example 2: headers cors
MIDDLEWARE = [
...
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
...
]