[grid] Adding handler for options when using cors and creating a session
[skip ci]
import static org.openqa.selenium.remote.http.Route.combine;
import static org.openqa.selenium.remote.http.Route.delete;
import static org.openqa.selenium.remote.http.Route.get;
+import static org.openqa.selenium.remote.http.Route.options;
import static org.openqa.selenium.remote.http.Route.post;
public abstract class NewSessionQueue implements HasReadyState, Routable {
@@ -67,6 +68,8 @@ protected NewSessionQueue(Tracer tracer, Secret registrationSecret) {
);
return addToQueue(sessionRequest);
}),
+ options("/session")
+ .to(() -> req -> new HttpResponse()),
post("/se/grid/newsessionqueue/session")
.to(() -> new AddToSessionQueue(tracer, this))
.with(requiresSecret),
