Closed ericlewis closed 1 year ago
It seems possible that the notes here https://github.com/kwhitley/itty-router/pull/148 & itty-cors could be helpful and negate the need for this PR. I will investigate.
🧪 A prerelease is available for testing 🧪
You can install this latest build in your project with:
npm install --save https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/4669702351/npm-package-itty-router-openapi-43
Or you can immediately run this with npx
:
npx https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/4669702351/npm-package-itty-router-openapi-43
Hey @ericlewis, we will be updating the itty-router dependency to 4.x as soon as it is released I think it is better to keep CORS config out of this library (itty-router-openapi), and let the user configure CORS on its own, using the provided itty-router functions
that will work like this
But I agree, that we should provide example development configurations in the docs for this aiPlugin feature
Hey @ericlewis do you think this pr still makes sence?
Closing this pr for inactivity
When developing ChatGPT plugins locally, there are aspects we can automate to streamline the development process.
This Pull Request introduces an
is_dev
flag to theaiPlugin
options that serves two purposes:Modifies the default CORS settings Alters the URL for the OpenAPI specification to target localhost. This approach assumes the utilization of wrangler dev for local execution.
Please note that this PR addresses the issue specifically concerning the OpenAPI specification and ai-plugin.json files. Further efforts are required to enable routes to adopt these default parameters. I welcome feedback and suggestions on the optimal method to achieve this objective. One alternative idea involves the implementation of a comprehensive "default headers" system that can be automatically applied across all endpoints.