Comments (6)
Hm, our fetching code is slightly different:
export async function configApi(): Promise<Config> {
const response = await fetch(`${BACKEND_URI}/config`, {
method: "GET"
});
return (await response.json()) as Config;
}
versus
async function fetchAuthSetup(): Promise<AuthSetup> {
const response = await fetch("/auth_setup");
if (!response.ok) {
throw new Error(`auth setup response was not ok: ${response.status}`);
}
return await response.json();
}
So I wonder if BACKEND_URI is confusing it. What do you see in the network requests of your browser for that request? You could try changing that fetch to just "/config", if you dont have any need to override BACKEND_URI.
from azure-search-openai-demo.
Switching to just /config still results in a 403.
I guess something else to note is that the .auth/me and .auth/refresh don't resolve either, which might another factor in this issue?
is there a reason why the config api request needs to have token sent in authorization headers?
Also, is there a place where you can see the logs that is outputted from the gunicorn server? as opposed to just the app service logs
from azure-search-openai-demo.
If .auth* routes are not working, then your App Service built-in authentication is not set up properly. A correct setup looks like this in the Portal:
But I don't think we've made it a strict requirement that App Service built-in auth must be setup, since we also use the MSAL SDKs to handle authentication. Do you perhaps have a partially setup built-in auth that's messing with stuff? Do you see anything on that authentication page?
I have tips here for viewing App Service logs:
https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/appservice.md
I usually download them. You may need to increase your log level to see more logs, since it defaults to WARNING level in production.
from azure-search-openai-demo.
My auth settings page is identical to yours...
HOWEVER,
Seeing the difference in code you posted versus what version of the repo we had was an issue:
Yours:
export async function configApi(): Promise<Config> {
const response = await fetch(`${BACKEND_URI}/config`, {
method: "GET"
});
return (await response.json()) as Config;
}
Ours:
export async function configApi(idToken: string | undefined): Promise<Config> {
const response = await fetch("/config", {
method: "GET",
headers: getHeaders(idToken)
});
return (await response.json()) as Config;
}
Ill probably need to pull the latest version and then see if those issues still persist, at least on first test, the new version of the code fixed the 403 issue with config
from azure-search-openai-demo.
Ah, yes, I removed getHeaders as I realized the backend wasn't using it. Glad it's working better.
from azure-search-openai-demo.
Ok, I'm still seeing 403 errors accessing /chat, even though the same auth method is working for a local development
not seeing any exceptions in Azure Monitor, nor is anything showing up in App Service Logs with the logging level set to INFO
from azure-search-openai-demo.
Related Issues (20)
- Add Private Link to Key Vault
- Behavior in production different from local deployment HOT 3
- New Deployment Failed HOT 5
- Incorrect Environment Variables name in main.bicep for GLOBAL_DOCUMENTS HOT 1
- Doubt about data sensitivity HOT 1
- Customizing? Am I Doing this Wrong? HOT 3
- I want to use the Azure open ai knowledge base. Currently it's only giving the results from the PDF. I want results outside the PDF. Thanks in advance. HOT 3
- OpenAI azure HOT 5
- Search Results are Empty after Browsersession is inactive for a while HOT 2
- Issue - getting error while using await in authConfig.ts file HOT 2
- gpt-4o HOT 11
- Application Error (temp-ea) HOT 3
- Need some clarification on IntegratedVectorizerStrategy and Indexer HOT 2
- Requirement to return exhaustive results HOT 1
- Fail to start the site after successful deployment HOT 2
- Inquiry example files after enabling authentication HOT 3
- This repo and commercial purposes HOT 1
- Alternative Sign In HOT 1
- Erroneous overlap calculation
- Access the localhost application from another machine using IP HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-search-openai-demo.