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:
echo 2026-02-28 17:46:59 +01:00
parent a5c57b33f7
commit cbdb801655

View File

@ -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 {};
} }