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() {
|
private getHeaders() {
|
||||||
// Only include Authorization header if token is set
|
// Use public API access - no authentication needed
|
||||||
if (this.strapiApiToken) {
|
// Strapi Public role has been configured to allow article access
|
||||||
return {
|
|
||||||
Authorization: `Bearer ${this.strapiApiToken}`,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user