How to configure prefect base url

I’m trying to give authentication to prefect via oauth2 proxy and azure entra id using ingress file
Currently my prefect url is <domain.tech> this is not supporting for authentication.
so i need to change my prefect base url from PREFECT_API_URL=“127.0.0.1:4200/api” this to PREFECT_API_URL="127.0.0.1:4200/prefect

my prefect deployment file is supporting only root path / if i change root path from / this to /prefect in ingress file im facing this issue raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.cause
prefect.exceptions.PrefectHTTPStatusError: Client error ‘405 Method Not Allowed’ for url ‘Prefect Server
Response: {‘detail’: ‘Method Not Allowed’}
For more information check 405 Method Not Allowed - HTTP Status Code Glossary - WebFX
An exception occurred