Skip to content

Commit

Permalink
soften csp, improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed Feb 23, 2024
1 parent 2818dba commit 7202225
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ curl -k -X POST https://gdev.industra.space/api/stor/v1/buckets/30ef1e33-da44-45
-F 'field1=fiels2' | jq .

curl -k -X PATCH "https://glued/api/stor/v1/buckets/1fcb4d5c-5364-4cf3-b24e-070c4c71f8d2/objects/a2134852-e39f-4b81-8071-2971d1d48506/meta" -H "Content-Type: application/json" -d '{"example": 1}'
curl -k -X PATCH "https://gdev.industra.space/api/stor/v1/buckets/30ef1e33-da44-4503-85b0-a2ba41e2d82e/objects/e4f2ce6f-f4db-462d-8712-61928a5142f2/meta" -H "Content-Type: application/json" -d '{"example": 1}'
curl -k -X PUT "https://glued/api/stor/v1/buckets/1fcb4d5c-5364-4cf3-b24e-070c4c71f8d2/objects/a2134852-e39f-4b81-8071-2971d1d48506/refs" -H "Content-Type: application/json" -d '{"predecessor": "a2134852-e39f-4b81-8071-2971d1d48506", "sekatko:vpd": "a2134852-e39f-4b81-8071-2971d1d48506"}'
curl -k -X DELETE "https://glued/api/stor/v1/buckets/1fcb4d5c-5364-4cf3-b24e-070c4c71f8d2/objects/a2134852-e39f-4b81-8071-2971d1d48506/refs" -H "Content-Type: application/json" -d '{"predecessor": "a2134852-e39f-4b81-8071-2971d1d48506", "sekatko:vpd": "a2134852-e39f-4b81-8071-2971d1d48506"}'


curl -k -X PATCH "https://gdev.industra.space/api/stor/v1/buckets/30ef1e33-da44-4503-85b0-a2ba41e2d82e/objects/e4f2ce6f-f4db-462d-8712-61928a5142f2/meta" -H "Content-Type: application/json" -d '{"example": 1}'
curl -k -X PUT "https:///gdev.industra.space/api/stor/v1/buckets/30ef1e33-da44-4503-85b0-a2ba41e2d82e/objects/e4f2ce6f-f4db-462d-8712-61928a5142f2/refs" -H "Content-Type: application/json" -d '{"predecessor": "e4f2ce6f-f4db-462d-8712-61928a5142f2", "sekatko:vpd": "e4f2ce6f-f4db-462d-8712-61928a5142f2"}'
curl -k -X DELETE "https:///gdev.industra.space/api/stor/v1/buckets/30ef1e33-da44-4503-85b0-a2ba41e2d82e/objects/e4f2ce6f-f4db-462d-8712-61928a5142f2/refs" -H "Content-Type: application/json" -d '{"predecessor": "e4f2ce6f-f4db-462d-8712-61928a5142f2", "sekatko:vpd": "e4f2ce6f-f4db-462d-8712-61928a5142f2"}'

```


Expand Down
1 change: 1 addition & 0 deletions glued/Controllers/ServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ public function links_r1(Request $request, Response $response, array $args = [])
$mime = mime_content_type($file);
$response = $response
->withHeader('Content-Type', $mime)
->withHeader('Content-Security-Policy', 'upgrade-insecure-requests')
->withHeader('Content-Disposition', "inline;filename=\"{$res['obj']}.{$mime}\"")
->withHeader('Content-Length', filesize($file));
$fileStream = fopen($file, 'rb');
Expand Down

0 comments on commit 7202225

Please sign in to comment.