If you need to preserve the encoded URL in your containerized application, you can try the following approaches:
Double-encoding: One possible workaround is to double-encode the URL when making requests from your application. In your case, when making the npm GET request, you can encode the package name twice, like "/-/package/@scope%252fname/dist-tags". This way, when the URL is decoded by Azure Container Apps, it will retain the original encoded value.
Custom encoding/decoding: If you have control over the code in your containerized application, you can implement custom encoding and decoding logic to handle the URL encoding. This would involve modifying your application code to correctly encode the URLs and decode them when processing the requests. This way, you can ensure that the URLs are processed correctly regardless of how Azure Container Apps handles the ingress.
It's important to note that modifying the encoding behavior of Azure Container Apps is not directly possible since it is a platform-managed service. Therefore, the suggested approaches focus on working around the behavior by modifying the encoding in your application logic.
If these workarounds are not suitable for your use case, you may consider exploring other Azure services or deployment options that provide more fine-grained control over URL decoding and routing, such as Azure Kubernetes Service (AKS) or Azure App Service.