Trying to set up an Azure Function as an endpoint

You are doing everything right - but when you’re trying to access a manifest file from localhost you’re encountering issues with CORS (Cross-Origin Resource Sharing). So, if the Python TodoGPT is working correctly on the same machine, it indicates that your localhost server is running, and the issue may be specific to the .NET implementation or configuration.

  1. Check your networking settings: localhost server must be accessible from your .NET language code. Check the correct hostname, port, and protocol for any misspellings.
    1.1 Does the firewall/antivirus allow the connection?
    1.2 The default port for localhost is 80 for HTTP and 443 for HTTPS may require administrative privileges to connect to some platforms
    1.3 HTTPS (443) requires SSL/TLS certificates for encryption;

  2. Check the OpenAPI specifications (openapi.yaml): they are correctly defined and adhere to the current OpenAPI specification? Incorrect or incomplete specifications may result in some issues when trying to access the manifest file;

  3. Debug your code: the .NET code, look for any issues related to CORS or the manifest file - assuming the manifest file is correctly located at the endpoint “/.well-known/ai-plugin.json” on your localhost server.

With the information you provided, it is the only thing I could think at this moment.

I hope this helps. Please advise of any changes.

Complement:
Check this thread: someone got to solve CORS issues using a proxy.

Cross-Origin Resource Sharing (CORS)