Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
6575b31f
Commit
6575b31f
authored
May 28, 2015
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3059 from izeye/patch-12
* patch-12: Fix allowCredentials property handling
parents
fc067d1b
88612393
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
MvcEndpointCorsProperties.java
...boot/actuate/autoconfigure/MvcEndpointCorsProperties.java
+1
-1
MvcEndpointCorsIntegrationTests.java
...actuate/endpoint/mvc/MvcEndpointCorsIntegrationTests.java
+9
-0
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MvcEndpointCorsProperties.java
View file @
6575b31f
...
@@ -133,7 +133,7 @@ public class MvcEndpointCorsProperties {
...
@@ -133,7 +133,7 @@ public class MvcEndpointCorsProperties {
corsConfiguration
.
setMaxAge
(
this
.
maxAge
);
corsConfiguration
.
setMaxAge
(
this
.
maxAge
);
}
}
if
(
this
.
allowCredentials
!=
null
)
{
if
(
this
.
allowCredentials
!=
null
)
{
corsConfiguration
.
setAllowCredentials
(
t
rue
);
corsConfiguration
.
setAllowCredentials
(
t
his
.
allowCredentials
);
}
}
return
corsConfiguration
;
return
corsConfiguration
;
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpointCorsIntegrationTests.java
View file @
6575b31f
...
@@ -160,6 +160,15 @@ public class MvcEndpointCorsIntegrationTests {
...
@@ -160,6 +160,15 @@ public class MvcEndpointCorsIntegrationTests {
header
().
string
(
HttpHeaders
.
ACCESS_CONTROL_ALLOW_CREDENTIALS
,
"true"
));
header
().
string
(
HttpHeaders
.
ACCESS_CONTROL_ALLOW_CREDENTIALS
,
"true"
));
}
}
@Test
public
void
credentialsCanBeDisabled
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"endpoints.cors.allowed-origins:foo.example.com"
,
"endpoints.cors.allow-credentials:false"
);
performAcceptedCorsRequest
().
andExpect
(
header
().
doesNotExist
(
HttpHeaders
.
ACCESS_CONTROL_ALLOW_CREDENTIALS
));
}
@Test
@Test
public
void
jolokiaEndpointUsesGlobalCorsConfiguration
()
throws
Exception
{
public
void
jolokiaEndpointUsesGlobalCorsConfiguration
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment