File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
job-server/src/main/scala/spark/jobserver Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Also see [Chinese docs / 中文](doc/chinese/job-server.md).
50
50
- [ Context configuration] ( #context-configuration )
51
51
- [ Other configuration settings] ( #other-configuration-settings )
52
52
- [ Job Result Serialization] ( #job-result-serialization )
53
+ - [ HTTP Override] ( #http-override )
53
54
- [ Clients] ( #clients )
54
55
- [ Contribution and Development] ( #contribution-and-development )
55
56
- [ Publishing packages] ( #publishing-packages )
@@ -791,6 +792,19 @@ serialized properly:
791
792
792
793
If we encounter a data type that is not supported, then the entire result will be serialized to a string.
793
794
795
+ ### HTTP Override
796
+
797
+ Spark Job Server offers HTTP override functionality.
798
+ Often reverse proxies and firewall implement access limitations to, for example, DELETE and PUT requests.
799
+ HTTP override allows overcoming these limitations by wrapping, for example, a DELETE request into a POST request.
800
+
801
+ Requesting the destruction of a context can be accomplished through HTTP override using the following syntax:
802
+
803
+ $ curl -X POST "localhost:8090/contexts/test_context?_method=DELETE"
804
+
805
+ Here, a DELETE request is passed to Spark Job Server "through" a POST request.
806
+
807
+
794
808
## Clients
795
809
796
810
Spark Jobserver project has a
Original file line number Diff line number Diff line change @@ -139,8 +139,10 @@ class WebApi(system: ActorSystem,
139
139
val logger = LoggerFactory .getLogger(getClass)
140
140
141
141
val myRoutes = cors {
142
- binaryRoutes ~ jarRoutes ~ contextRoutes ~ jobRoutes ~
143
- dataRoutes ~ healthzRoutes ~ otherRoutes
142
+ overrideMethodWithParameter(" _method" ) {
143
+ binaryRoutes ~ jarRoutes ~ contextRoutes ~ jobRoutes ~
144
+ dataRoutes ~ healthzRoutes ~ otherRoutes
145
+ }
144
146
}
145
147
146
148
lazy val authenticator : AuthMagnet [AuthInfo ] = {
You can’t perform that action at this time.
0 commit comments