Skip to content

Commit c0ec47d

Browse files
committed
Testing fixes
Changes to be committed: modified: admin_only/bco_api.conf modified: config/fixtures/test_portal.json
1 parent fd9c4a4 commit c0ec47d

File tree

2 files changed

+61
-42
lines changed

2 files changed

+61
-42
lines changed

admin_only/bco_api.conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@ server {
4040
proxy_pass http://127.0.0.1:8080;
4141
}
4242

43+
# BCO API - Draft objects
44+
#location ~* \/BCO_(\d+)\/(\d+)\.(\d+) {
45+
location ~* ^/[a-zA-Z]+_DRAFT_(.*?) {
46+
proxy_set_header Host $http_host;
47+
proxy_set_header X-Real-IP $remote_addr;
48+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49+
proxy_set_header X-Forwarded-Proto $scheme;
50+
proxy_pass http://unix:/var/run/bco_api.sock;
51+
}
52+
53+
# BCO API - Published objects
54+
#location ~* \/BCO_(\d+)\/(\d+)\.(\d+) {
55+
location ~* ^/[a-zA-Z]+_(.*?) {
56+
proxy_set_header Host $http_host;
57+
proxy_set_header X-Real-IP $remote_addr;
58+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
59+
proxy_set_header X-Forwarded-Proto $scheme;
60+
proxy_pass http://unix:/var/run/bco_api.sock;
61+
}
4362

4463
location / {
4564
if ($request_method = 'OPTIONS') {

config/fixtures/test_portal.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"action_time": "2024-04-03T11:36:31.006Z",
77
"user": 7,
88
"content_type": 12,
9-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
10-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
9+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
10+
"object_repr": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
1111
"action_flag": 2,
1212
"change_message": "[{\"changed\": {\"fields\": [\"Authorized users\"]}}]"
1313
}
@@ -19,8 +19,8 @@
1919
"action_time": "2024-04-11T12:43:08.498Z",
2020
"user": 7,
2121
"content_type": 12,
22-
"object_id": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/DRAFT",
23-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/DRAFT",
22+
"object_id": "https://test.portal.biochemistry.gwu.edu/TEST_000001/DRAFT",
23+
"object_repr": "https://test.portal.biochemistry.gwu.edu/TEST_000001/DRAFT",
2424
"action_flag": 2,
2525
"change_message": "[{\"changed\": {\"fields\": [\"Contents\"]}}]"
2626
}
@@ -32,8 +32,8 @@
3232
"action_time": "2024-04-11T13:34:58.678Z",
3333
"user": 7,
3434
"content_type": 12,
35-
"object_id": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
36-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
35+
"object_id": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
36+
"object_repr": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
3737
"action_flag": 3,
3838
"change_message": ""
3939
}
@@ -45,8 +45,8 @@
4545
"action_time": "2024-04-11T15:01:33.676Z",
4646
"user": 7,
4747
"content_type": 12,
48-
"object_id": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
49-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
48+
"object_id": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
49+
"object_repr": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
5050
"action_flag": 3,
5151
"change_message": ""
5252
}
@@ -58,8 +58,8 @@
5858
"action_time": "2024-04-11T20:49:34.241Z",
5959
"user": 7,
6060
"content_type": 12,
61-
"object_id": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
62-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
61+
"object_id": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
62+
"object_repr": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
6363
"action_flag": 3,
6464
"change_message": ""
6565
}
@@ -71,8 +71,8 @@
7171
"action_time": "2024-04-11T20:52:33.448Z",
7272
"user": 7,
7373
"content_type": 12,
74-
"object_id": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
75-
"object_repr": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/1.21",
74+
"object_id": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
75+
"object_repr": "https://test.portal.biochemistry.gwu.edu/TEST_000001/1.21",
7676
"action_flag": 3,
7777
"change_message": ""
7878
}
@@ -910,10 +910,10 @@
910910
},
911911
{
912912
"model": "biocompute.bco",
913-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000000/1.0",
913+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000000/1.0",
914914
"fields": {
915915
"contents": {
916-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
916+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
917917
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
918918
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
919919
"provenance_domain": {
@@ -1143,10 +1143,10 @@
11431143
},
11441144
{
11451145
"model": "biocompute.bco",
1146-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000000/DRAFT",
1146+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000000/DRAFT",
11471147
"fields": {
11481148
"contents": {
1149-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
1149+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
11501150
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
11511151
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
11521152
"provenance_domain": {
@@ -1376,10 +1376,10 @@
13761376
},
13771377
{
13781378
"model": "biocompute.bco",
1379-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000001/1.0",
1379+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000001/1.0",
13801380
"fields": {
13811381
"contents": {
1382-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
1382+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
13831383
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
13841384
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
13851385
"provenance_domain": {
@@ -1609,10 +1609,10 @@
16091609
},
16101610
{
16111611
"model": "biocompute.bco",
1612-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000001/DRAFT",
1612+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000001/DRAFT",
16131613
"fields": {
16141614
"contents": {
1615-
"object_id": "https://test.portal.biochemistry.gwu.edu/lBCO_000001/DRAFT",
1615+
"object_id": "https://test.portal.biochemistry.gwu.edu/BCO_000001/DRAFT",
16161616
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
16171617
"etag": "eb8ac2d04b2d3204b88e0bc6e3a66dcfac4af934c1ebe7ce629f8f584d5f3d7a",
16181618
"provenance_domain": {
@@ -1977,10 +1977,10 @@
19771977
},
19781978
{
19791979
"model": "biocompute.bco",
1980-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000002/DRAFT",
1980+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000002/DRAFT",
19811981
"fields": {
19821982
"contents": {
1983-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
1983+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
19841984
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
19851985
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
19861986
"provenance_domain": {
@@ -2210,10 +2210,10 @@
22102210
},
22112211
{
22122212
"model": "biocompute.bco",
2213-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000003/DRAFT",
2213+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000003/DRAFT",
22142214
"fields": {
22152215
"contents": {
2216-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
2216+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
22172217
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
22182218
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
22192219
"provenance_domain": {
@@ -2443,10 +2443,10 @@
24432443
},
24442444
{
24452445
"model": "biocompute.bco",
2446-
"pk": "https://test.portal.biochemistry.gwu.edu/lBCO_000004/DRAFT",
2446+
"pk": "https://test.portal.biochemistry.gwu.edu/BCO_000004/DRAFT",
24472447
"fields": {
24482448
"contents": {
2449-
"object_id": "https://test.portal.biochemistry.gwu.edu/lBCO_000004/DRAFT",
2449+
"object_id": "https://test.portal.biochemistry.gwu.edu/BCO_000004/DRAFT",
24502450
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
24512451
"etag": "0d692b94bc2528660470e38c78708cc06605f941",
24522452
"provenance_domain": {
@@ -2492,10 +2492,10 @@
24922492
},
24932493
{
24942494
"model": "biocompute.bco",
2495-
"pk": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/1.0",
2495+
"pk": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/1.0",
24962496
"fields": {
24972497
"contents": {
2498-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
2498+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
24992499
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
25002500
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
25012501
"provenance_domain": {
@@ -2725,10 +2725,10 @@
27252725
},
27262726
{
27272727
"model": "biocompute.bco",
2728-
"pk": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
2728+
"pk": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
27292729
"fields": {
27302730
"contents": {
2731-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
2731+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
27322732
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
27332733
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
27342734
"provenance_domain": {
@@ -2960,10 +2960,10 @@
29602960
},
29612961
{
29622962
"model": "biocompute.bco",
2963-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000001/DRAFT",
2963+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000001/DRAFT",
29642964
"fields": {
29652965
"contents": {
2966-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
2966+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
29672967
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
29682968
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
29692969
"provenance_domain": {
@@ -3195,10 +3195,10 @@
31953195
},
31963196
{
31973197
"model": "biocompute.bco",
3198-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000002/DRAFT",
3198+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000002/DRAFT",
31993199
"fields": {
32003200
"contents": {
3201-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
3201+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
32023202
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
32033203
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
32043204
"provenance_domain": {
@@ -3428,10 +3428,10 @@
34283428
},
34293429
{
34303430
"model": "biocompute.bco",
3431-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000004/DRAFT",
3431+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000004/DRAFT",
34323432
"fields": {
34333433
"contents": {
3434-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
3434+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
34353435
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
34363436
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
34373437
"provenance_domain": {
@@ -3661,10 +3661,10 @@
36613661
},
36623662
{
36633663
"model": "biocompute.bco",
3664-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000005/DRAFT",
3664+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000005/DRAFT",
36653665
"fields": {
36663666
"contents": {
3667-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
3667+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
36683668
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
36693669
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
36703670
"provenance_domain": {
@@ -3894,10 +3894,10 @@
38943894
},
38953895
{
38963896
"model": "biocompute.bco",
3897-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000006/DRAFT",
3897+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000006/DRAFT",
38983898
"fields": {
38993899
"contents": {
3900-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
3900+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
39013901
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
39023902
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
39033903
"provenance_domain": {
@@ -4127,10 +4127,10 @@
41274127
},
41284128
{
41294129
"model": "biocompute.bco",
4130-
"pk": "https://test.portal.biochemistry.gwu.edu/lTEST_000007/DRAFT",
4130+
"pk": "https://test.portal.biochemistry.gwu.edu/TEST_000007/DRAFT",
41314131
"fields": {
41324132
"contents": {
4133-
"object_id": "https://test.portal.biochemistry.gwu.edu/lNOPUB_000001/DRAFT",
4133+
"object_id": "https://test.portal.biochemistry.gwu.edu/NOPUB_000001/DRAFT",
41344134
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
41354135
"etag": "998f0b8a499bd88952f945367c17d62e95611c9d026fb0713b84a5fa9bfb745d",
41364136
"provenance_domain": {

0 commit comments

Comments
 (0)