Skip to content

Use CORS for the proxy #436

Answered by StephenHodgson
LanzelotAsp asked this question in Q&A
Discussion options

You must be logged in to vote

You could just build it yourself and replace that call with your own version of the following:

var builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
builder.Logging.AddConsole();
builder.Logging.SetMinimumLevel(LogLevel.Debug);
builder.WebHost.ConfigureKestrel(ConfigureKestrel);
builder.Services.AddSingleton(openAIClient);
builder.Services.AddSingleton<IAuthenticationFilter, T>();
var app = builder.Build();
var startup = new OpenAIProxy();
startup.Configure(app, app.Environment);

You don't have to use OpenAiProxy.Crea…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@StephenHodgson
Comment options

Answer selected by StephenHodgson
Comment options

You must be logged in to vote
1 reply
@StephenHodgson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants