differentConfigsPerOrigin() — netty Function Reference
Architecture documentation for the differentConfigsPerOrigin() function in CorsHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 73502b04_4747_bb08_3b00_23fbd849a9ee["differentConfigsPerOrigin()"] e946b2e4_b243_053e_5c0a_3d1a9a50042d["CorsHandlerTest"] 73502b04_4747_bb08_3b00_23fbd849a9ee -->|defined in| e946b2e4_b243_053e_5c0a_3d1a9a50042d e60d18d8_fd23_cf06_216e_d68d84f411ae["assertValues()"] 73502b04_4747_bb08_3b00_23fbd849a9ee -->|calls| e60d18d8_fd23_cf06_216e_d68d84f411ae style 73502b04_4747_bb08_3b00_23fbd849a9ee fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java lines 454–471
@Test
public void differentConfigsPerOrigin() {
String host1 = "http://host1:80";
String host2 = "http://host2";
CorsConfig rule1 = forOrigin(host1).allowedRequestMethods(HttpMethod.GET).build();
CorsConfig rule2 = forOrigin(host2).allowedRequestMethods(HttpMethod.GET, HttpMethod.POST)
.allowCredentials().build();
List<CorsConfig> corsConfigs = Arrays.asList(rule1, rule2);
final HttpResponse preFlightHost1 = preflightRequest(corsConfigs, host1, "", false);
assertEquals("GET", preFlightHost1.headers().get(ACCESS_CONTROL_ALLOW_METHODS));
assertNull(preFlightHost1.headers().getAsString(ACCESS_CONTROL_ALLOW_CREDENTIALS));
final HttpResponse preFlightHost2 = preflightRequest(corsConfigs, host2, "", false);
assertValues(preFlightHost2, ACCESS_CONTROL_ALLOW_METHODS.toString(), "GET", "POST");
assertEquals("true", preFlightHost2.headers().getAsString(ACCESS_CONTROL_ALLOW_CREDENTIALS));
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does differentConfigsPerOrigin() do?
differentConfigsPerOrigin() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java.
Where is differentConfigsPerOrigin() defined?
differentConfigsPerOrigin() is defined in codec-http/src/test/java/io/netty/handler/codec/http/cors/CorsHandlerTest.java at line 454.
What does differentConfigsPerOrigin() call?
differentConfigsPerOrigin() calls 1 function(s): assertValues.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free