@julian said in Hook for modifying session cookie:
Hi @asdrubalivan! That's an interesting conundrum you've got there...
However, it seems last last year, @oplik0 used sameSite: 'Strict' for API routes, or at least, those requiring the CSRF token.
Not a dev so don't follow most of this but my eyes did pick out the cross site and strict, and yes, necessary for CSRF. Seems trying to work around that would be less than advisable? I guess it ultimately depends on your security stance and cost/benefit but I'd be wary of circumventing. It's a freakin' war zone out there. And an election year for U.S. so expect community and blogger sites to be targeted vigorously and relentlessly.
My $0.02. We now return you to your regularly scheduled programming...
I don't think that there is one. But you could make one yourself, of course.
You could have the same effect, I think, by just posting in the group, though. Once you want to get a public message to everyone on the forum, the forum is the best mechanism for that.
@seh @julian Hello guys, just stumbled into this - could it come in handy for something?
not really, that's the same functionality i'm hoping the maps + the other plugins will be able to make possible in NodeBB. without involving hosted service
If you are using nodebb-plugin-emoji-extended then there is a 'dirty' fix for that.
Navigate to your Emoji plugin folder and open index.js.
Example path: /home/nodebb/node_modules/nodebb-plugin-emoji-extended/index.js.
Once you've opened the file, find a part where it states emojiPath="http://127.0.0.1:4567/plugins/nodebb-plugin-emoji/images/".
Set this to something like this emojiPath="http://forum.domain.com/plugins/nodebb-plugin-emoji-extended/images"
Of course, this will only work if you are running NodeBB with nginx or Apache proxy.
Maybe it would be better to keep that config in the plugin's directory and then modify this line to:
Also, am looking forward to you releasing this plugin
when will the appropiate hook be to be able to parse the recipe and arrange and pretty it to show it to the users?
The hook you want is probably plugins.fireHook('filter:post.save', postData, next);. This is called right before the post is saved into the database.
How are posts saved? in raw text? is the text parsed with Marked when each post loads?
Yes the raw text is saved into the database and parsed on the way out.
The easiest way for this to work would be to listen to that hook and find the file links in the postData.content they will be in the form [link text](link url). You can grab link url, make sure it exists and read it and then append it to the postData.content in your plugin.
Sounds like its doable. Apparently you can embed Hackpad on your site using their code:
<script src=“https://hackpad.com/<string>.js”></script><noscript><div>View <a href=“https://hackpad.com/<string>.js”>To-Do</a></div></noscript>
So all you'd have to do is create a static page maybe and paste the above in a template