Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Sling model exporter + ReactJS - CORS error

Avatar

Avatar
Ignite 5
Level 2
aliaksandr_hvoz
Level 2

Likes

5 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Ignite 5
Level 2
aliaksandr_hvoz
Level 2

Likes

5 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
aliaksandr_hvoz
Level 2

04-04-2020

Hello.

Could you give me some advice on how to fix the error:

aliaksandr_hvoz_0-1586061483205.png

 

I created a Sling Model with an exporter and I'm trying to get JSON on request from the ReactJS App.

ReactJS app:

aliaksandr_hvoz_1-1586036150777.png

aliaksandr_hvoz_0-1586061233842.png

 

 

I also created a filter for the set headers for CORS:

aliaksandr_hvoz_3-1586036270269.png

aliaksandr_hvoz_1-1586061305291.png

 

 

If I make a request from the browser, I will get JSON but not from ReactApp.

 

And configuration from AEM:

aliaksandr_hvoz_5-1586036493658.png

I use AEM 6.4 version. 

Could you please tell how to solve this problem.

 

Thanks in advance for any advice.

 

 

 
View Entire Topic

Avatar

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

146 likes

Total Posts

157 posts

Correct Reply

41 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

146 likes

Total Posts

157 posts

Correct Reply

41 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile
Suraj_Kamdi
MVP

06-04-2020

@aliaksandr_hvoz  Please go through this link https://blogs.perficient.com/2019/09/17/creating-your-first-custom-aem-component-using-react-part-1/

I hope this will help you to resolve your query.