mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 21:25:59 +00:00
inner activator
This commit is contained in:
@@ -23,6 +23,8 @@ function unauthorizedResponse(req, res, text) {
|
|||||||
function authMiddleware(req, res, next) {
|
function authMiddleware(req, res, next) {
|
||||||
const SKIP_AUTH_PATHS = ['/config/get', '/auth/oauth-token', '/auth/login', '/stream'];
|
const SKIP_AUTH_PATHS = ['/config/get', '/auth/oauth-token', '/auth/login', '/stream'];
|
||||||
|
|
||||||
|
// console.log('********************* getAuthProvider()', getAuthProvider());
|
||||||
|
|
||||||
if (!getAuthProvider().shouldAuthorizeApi()) {
|
if (!getAuthProvider().shouldAuthorizeApi()) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|||||||
8
packages/web/src/utility/InnerActivator.svelte
Normal file
8
packages/web/src/utility/InnerActivator.svelte
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import createActivator from './createActivator';
|
||||||
|
|
||||||
|
export let name;
|
||||||
|
export let activateOnTabVisible = false;
|
||||||
|
|
||||||
|
export const activator = createActivator(name, activateOnTabVisible);
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user