AEM 6.1 Server Access Issue (Authenticated vs Anonymous)
We're in the process of upgrading from CQ 5.5 to AEM 6.1 and we're working with existing code that we have.
We've recently run into an issue on some of our upgraded servers (can't duplicate this locally on a fresh AEM 6.1) where servlets that we have configured are accessible just fine via an anonymous connection but when a user is authenticated (even on Publish which we require) then the same code acts like the Servlet doesn't exist when calling it.
I wasn't aware of any changes in AEM 6.1 that required additional changes to the code or at the OSGi Console level with regards to how a Servlet is accessed.
Here is an example of what our servlet code looks like with names removed.
@Service
@SlingServlet(paths = "/bin/abc/abc123", methods = { "POST" }, metatype = true, label = "Description of the Servlet")
public class ClassName extends SlingAllMethodsServlet {
Here is part of the jQuery Ajax request we've been using:
$.ajax({
async: false,
type: "POST",
url: "/bin/abc/abc123",
data: { query: q},
dataType: "text"
})