This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { UnauthorizedException } from '@nestjs/common'; | |
import { app } from './app'; | |
import { ClientProxy } from '@nestjs/microservices'; | |
import { AUTH_SERVICE } from '@app/common'; | |
import { lastValueFrom } from 'rxjs'; | |
const publicRoutes = ['/public-route', '/another-public-route']; | |
export const authContext = async ({ req }) => { | |
// Check if the request path is in the list of public routes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sL https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml \ | |
| sed -e 's/__PILLAR__DNS__DOMAIN__/cluster.local/g' \ | |
| sed -e "s/__PILLAR__DNS__SERVER__/$(kubectl get service --namespace kube-system kube-dns -o jsonpath='{.spec.clusterIP}')/g" \ | |
| sed -e 's/__PILLAR__LOCAL__DNS__/169.254.20.10/g' \ | |
| kubectl apply -f - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'add_meta_boxes', 'mg_mb_create' ); | |
function mg_mb_create() { | |
add_meta_box( 'mg-meta', 'My Custom Meta Box', 'mg_mb_function', 'post', 'normal', 'high' ); | |
} | |
function mg_mb_function( $post ) { | |
// Retrieve the metadata values if they exist. |