Skip to content

Commit 6a872c4

Browse files
committed
Trying different settings for CORS.
1 parent 091c264 commit 6a872c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eFormAPI/eFormAPI/App_Start/WebApiConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void Register(HttpConfiguration config)
2121
{
2222
// Web API configuration and services
2323
// Configure Web API to use only bearer token authentication.
24-
var corsAttr = new EnableCorsAttribute("*", "*", "*");
24+
var corsAttr = new EnableCorsAttribute("*", "content-type", "GET");
2525
config.EnableCors(corsAttr);
2626
config.SuppressDefaultHostAuthentication();
2727
config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));

eFormAPI/eFormAPI/Controllers/EntitySelectController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public OperationDataResult<EntityGroup> GetEntityGroup(string entityGroupUid)
132132
[HttpGet]
133133
[AllowAnonymous]
134134
[Route("api/selectable-groups/get/exchange/{entityGroupUid}")]
135-
[EnableCors(origins: "*", headers: "*", methods: "*")]
135+
[EnableCors(origins: "*", headers: "content-type", methods: "GET")]
136136
public OperationDataResult<EntityGroup> GetEntityGroupExternally(string entityGroupUid, string token, string callerURL)
137137
{
138138
// Do some validation of the token. For now token is not valid

0 commit comments

Comments
 (0)