flow: pass Query on FlowExecutorSolve to prevent redirect issues

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-24 14:12:49 +01:00
parent 4d88af4601
commit 3698c6431c
3 changed files with 15 additions and 0 deletions

View File

@ -157,6 +157,15 @@ class FlowExecutorView(APIView):
@swagger_auto_schema(
responses={200: Challenge()},
request_body=ChallengeResponse(),
manual_parameters=[
openapi.Parameter(
"query",
openapi.IN_QUERY,
required=True,
description="Querystring as received",
type=openapi.TYPE_STRING,
)
],
operation_id="flows_executor_solve",
)
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:

View File

@ -2768,6 +2768,11 @@ paths:
required: true
schema:
$ref: '#/definitions/ChallengeResponse'
- name: query
in: query
description: Querystring as received
required: true
type: string
responses:
'200':
description: Challenge that gets sent to the client based on which stage

View File

@ -108,6 +108,7 @@ export class FlowExecutor extends LitElement implements StageHost {
return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({
flowSlug: this.flowSlug,
data: formData || {},
query: window.location.search.substring(1),
}).then((challengeRaw) => {
return challengeRaw.raw.json();
}).then((data) => {