Skip to content

Instantly share code, notes, and snippets.

View ananth-iyer's full-sized avatar

Ananth Iyer ananth-iyer

View GitHub Profile
@ananth-iyer
ananth-iyer / keybindings.json
Last active June 12, 2024 05:44
VS Code Keyword bindings for Terminal
/* Place your key bindings in this file to override the defaultsauto[] */
[
{
"key": "ctrl+tab",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"when": "terminalFocus",
"key": "ctrl+l",
@ananth-iyer
ananth-iyer / CsrfValidatorSkip.php
Last active October 30, 2023 10:33
Magento 2.3.0: Implement below code to skip the CSRF check on your custom route called outside Magento environment. This implementation does not break core frontend/adminhtml routes, Magento 2.3/2.2/2.1 web stores.
<?php
namespace Vendor\Module\Plugin;
class CsrfValidatorSkip
{
/**
* @param \Magento\Framework\App\Request\CsrfValidator $subject
* @param \Closure $proceed
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\App\ActionInterface $action