Expand my Community achievements bar.

Submitting Adaptive Form through Apache Proxy

Avatar

Level 7

Hello,

 

I have AEM installed behind Apache as a reverse proxy.  Everything is working well.  However, there are a few specific areas of concern and I believe it might be the proxy. 

 

I can open a form in AEM Inbox.  I click Submit.  After clicking confirm at the Confirmation window, I get the swirling squares loader.  

If I access the same task directly on the server with localhost:4502, I can submit successfully and it gives me the dialog that "the task has been completed".

 

I've looked at Chrome dev tools and the Network responses seem exactly the same.

However, in the console, I see this error:

Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at FormDashboard.TM.Util.showError (util.js:28:40)
at Object.errorHandler [as error] (workitemdetails.js:670:27)
at fire (jquery.js:3233:31)
at Object.fireWith [as rejectWith] (jquery.js:3363:7)
at done (jquery.js:9847:14)
at callback (jquery.js:10316:8)
at Object.send (jquery.js:10326:7)
at Function.ajax (jquery.js:9743:15)
at submitAction (workitemdetails.js:792:15)
FormDashboard.TM.Util.showError @ util.js:28
errorHandler @ workitemdetails.js:670
fire @ jquery.js:3233
fireWith @ jquery.js:3363
done @ jquery.js:9847
callback @ jquery.js:10316
send @ jquery.js:10326
ajax @ jquery.js:9743
submitAction @ workitemdetails.js:792
success @ workitemdetails.js:697
getFormDataObject @ guideRuntime.js:16465
onSubmitButtonClick @ workitemdetails.js:681
onclick @ workitemdetails.js:613

 

The submission works as expected, but I have to refresh the page and return to the inbox manually.  This is not good long term.

 

Any ideas would be greatly appreciated.

1 Reply

Avatar

Employee

Hi @crich2784 ,

Ensure that your Apache reverse proxy is correctly handling CORS headers. Sometimes, the AEM instance behind a reverse proxy may fail to send the necessary headers, causing issues with AJAX requests. Make sure you include proper headers for both Access-Control-Allow-Origin and Access-Control-Allow-Credentials in the Apache configuration.