Skip to content

Commit

Permalink
Fix/hos/auth fix (#35)
Browse files Browse the repository at this point in the history
* chore: use both alias and try_files, setup read/write/admin access
  • Loading branch information
valosnah authored Oct 8, 2024
1 parent cbb19af commit b0202c5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mockdata/authorization-mock/555111097.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Subject": {},
"Reportee": {"OrganizationNumber": "555111097"},
"Rights": [{"ServiceCode": "5977"}]
"Rights": [{"ServiceCode": "5755"}]
}
5 changes: 5 additions & 0 deletions mockdata/authorization-mock/555111097_01018800128.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Subject": {},
"Reportee": {"OrganizationNumber": "555111097"},
"Rights": [{"ServiceCode": "5977"}]
}
5 changes: 5 additions & 0 deletions mockdata/authorization-mock/555111097_01018800129.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Subject": {},
"Reportee": {"OrganizationNumber": "555111097"},
"Rights": [{"ServiceCode": "5977"}]
}
5 changes: 5 additions & 0 deletions mockdata/authorization-mock/555111097_01018800130.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Subject": {},
"Reportee": {"OrganizationNumber": "555111097"},
"Rights": [{"ServiceCode": "5977"}]
}
3 changes: 2 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ http {

location /api/serviceowner/authorization/rights {
default_type application/json;
try_files /mockdata/authorization-mock/${arg_subject}_${arg_reportee}.json /mockdata/authorization-mock/${arg_reportee}.json =404;
alias /mockdata/authorization-mock/;
try_files ${arg_reportee}_${arg_subject}.json ${arg_reportee}.json =404;
}
}
}

0 comments on commit b0202c5

Please sign in to comment.