fix: disable Authorization header for Strapi public API access
- Modify getHeaders() to always return empty object - Prevents sending invalid Bearer token that causes 401 errors - Strapi Public role permissions configured for unauthenticated access - Will allow proper article sync from Strapi to backend
This commit is contained in:
parent
a5c57b33f7
commit
cbdb801655
@ -106,12 +106,8 @@ export class StrapiService {
|
||||
}
|
||||
|
||||
private getHeaders() {
|
||||
// Only include Authorization header if token is set
|
||||
if (this.strapiApiToken) {
|
||||
return {
|
||||
Authorization: `Bearer ${this.strapiApiToken}`,
|
||||
};
|
||||
}
|
||||
// Use public API access - no authentication needed
|
||||
// Strapi Public role has been configured to allow article access
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user