-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 [#722] added real_user_ip for the whitelist permission
- Loading branch information
1 parent
912dc00
commit 94817d7
Showing
5 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ server { | |
|
||
location /sdg { | ||
proxy_pass http://web:8000; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/sdg/api/migrations/0006_alter_token_whitelisted_ips.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.13 on 2022-08-12 16:05 | ||
|
||
from django.db import migrations, models | ||
import sdg.core.db.fields | ||
import sdg.core.models.validators | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0005_auto_20220812_0821"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="token", | ||
name="whitelisted_ips", | ||
field=sdg.core.db.fields.DynamicArrayField( | ||
base_field=models.CharField(max_length=15), | ||
blank=True, | ||
default=list, | ||
help_text="De IP adressen waarvan organisaties POST, UPDATE en DELETE API calls van kan maken met deze API token.", | ||
size=None, | ||
validators=[sdg.core.models.validators.validate_ip_adress], | ||
), | ||
), | ||
] |
This file contains 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
This file contains 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
This file contains 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