File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/eligibility_signposting_api/views Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 33from datetime import UTC , datetime
44from http import HTTPStatus
55from typing import Annotated , Any
6+ from urllib .parse import quote
67
78from flask import Blueprint , make_response , request
89from flask .typing import ResponseReturnValue
@@ -180,6 +181,7 @@ def build_suitability_results(condition: Condition) -> list[eligibility_response
180181
181182
182183def build_status_payload (api_domain_name : str ) -> dict :
184+ encoded_domain = quote (api_domain_name , safe = "" )
183185 return {
184186 "status" : "pass" ,
185187 "version" : "" ,
@@ -193,7 +195,7 @@ def build_status_payload(api_domain_name: str) -> dict:
193195 "timeout" : False ,
194196 "responseCode" : HTTPStatus .OK ,
195197 "outcome" : "<html><h1>Ok</h1></html>" ,
196- "links" : {"self" : f"https://{ api_domain_name } /{ URL_PREFIX } /_status" },
198+ "links" : {"self" : f"https://{ encoded_domain } /{ URL_PREFIX } /_status" },
197199 }
198200 ]
199201 },
You can’t perform that action at this time.
0 commit comments