Thanks for asking @davidzuccarini, but I couldn’t understand your question well enough. Could you make your question again with more details?
Before your better question arrive first, this is parse-server thing, not Moralis. So I can reply to this topic only once in this forum and I could summarize a bit what I have achieved in here under this topic. So sent me DM in this forum for another issue if that will be only about parse-server.
My errors reasoned by that the parse-server can’t get application ID, so be sure that your app id is being sent via headers.
You need to add header field while calling cloud functions from the parse-server for it to recognize your app. For example, let’s assume you are using Firefox’s Web Developer Tools > Network Tab > REST Request Panel or similar tool like Postman, Insomnia etc., you must add x-parse-application-id
header field with your app id to be able to call a cloud function well.
_
Your self-hosted database management app has main index.ts
file, which runs ExpressJS backend management tool. You must add those lines into this index.ts file to make your public calls (POST) with your application id that’s been declared inside your .env file. e.g.:
...
// Declare application id through headers
app.use('/server/functions/:functionName', (req, res, next) => {
req.headers['x-parse-application-id'] = config.APPLICATION_ID;
next();
});
// before this:
const httpServer = http.createServer(app);
httpServer.listen(config.PORT, async () => {
...
_
So the topic was about that. Frankly, I couldn’t have time to design a middleware to hide my application id on REST requests yet. I assume it won’t be a security issue as long as class level securities adjusted well anyway, if anyone else think different I’d be appreciated to hear why.
_
You’d like to read this maybe: