Fix jwt-token
This commit is contained in:
@@ -25,7 +25,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should allow access when IP restrictions disabled', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: false,
|
||||
ip_restriction_enabled: false,
|
||||
allowed_ips: '192.168.1.1,10.0.0.1'
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should allow access from allowed IP', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.1,10.0.0.1,127.0.0.1'
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should block access from non-allowed IP', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.1,10.0.0.1'
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should extract IP from x-forwarded-for header', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '203.0.113.1'
|
||||
});
|
||||
|
||||
@@ -120,7 +120,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should extract IP from x-real-ip header', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '203.0.113.2'
|
||||
});
|
||||
|
||||
@@ -140,7 +140,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should handle CIDR notation in allowed IPs', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.0/24,10.0.0.0/8'
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should block IP outside CIDR range', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.0/24'
|
||||
});
|
||||
|
||||
@@ -178,7 +178,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should allow access from Docker container networks', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.1'
|
||||
});
|
||||
|
||||
@@ -200,7 +200,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should allow management routes regardless of IP restrictions', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.1'
|
||||
});
|
||||
|
||||
@@ -227,7 +227,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should handle empty allowed_ips list', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: ''
|
||||
});
|
||||
|
||||
@@ -246,7 +246,7 @@ describe('IP Restriction Middleware', () => {
|
||||
it('should handle null allowed_ips', async () => {
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: null
|
||||
});
|
||||
|
||||
@@ -267,7 +267,7 @@ describe('IP Restriction Middleware', () => {
|
||||
|
||||
const tenant = await createTestTenant({
|
||||
slug: 'test-tenant',
|
||||
ip_restrictions_enabled: true,
|
||||
ip_restriction_enabled: true,
|
||||
allowed_ips: '192.168.1.1'
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user