mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
inner activator
This commit is contained in:
parent
f39b3dd347
commit
53ee6eacb2
@ -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>
|
Loading…
Reference in New Issue
Block a user