(ia)Web Api Cors OPTIONS Method

iamgun(46)
Published in
#it
Words
30
Reading
1 min
9y
Listen to this post
~1 min
nuget에서 해당 라이브러리 설치 Microsoft.AspNet.WebApi.Cors
WebApiConfig.cs 에서 아래 코드 삽입
var enableCorsAttribute = new EnableCorsAttribute("*",
                                               "Origin, Content-Type, Accept",
                                               "GET, PUT, POST, DELETE, OPTIONS");
config.EnableCors(enableCorsAttribute);


web.config 에 origin 관련 데이터 삭제


2018년 1월 25일 목요일