@@ -203,25 +203,6 @@ test_localhost_gateway_response_should_contain \
203
203
204
204
# end Kubo specific end-to-end test
205
205
206
- # API on localhost subdomain gateway
207
-
208
- # /api/v0 present on the root hostname
209
- test_localhost_gateway_response_should_contain \
210
- " request for localhost/api" \
211
- " http://localhost:$GWAY_PORT /api/v0/refs?arg=${DIR_CID} &r=true" \
212
- " Ref"
213
-
214
- # /api/v0 not mounted on content root subdomains
215
- test_localhost_gateway_response_should_contain \
216
- " request for {cid}.ipfs.localhost/api returns data if present on the content root" \
217
- " http://${DIR_CID} .ipfs.localhost:$GWAY_PORT /api/file.txt" \
218
- " I am a txt file"
219
-
220
- test_localhost_gateway_response_should_contain \
221
- " request for {cid}.ipfs.localhost/api/v0/refs returns 404" \
222
- " http://${DIR_CID} .ipfs.localhost:$GWAY_PORT /api/v0/refs?arg=${DIR_CID} &r=true" \
223
- " 404 Not Found"
224
-
225
206
# # ============================================================================
226
207
# # Test subdomain-based requests to a local gateway with default config
227
208
# # (origin per content root at http://*.localhost)
@@ -308,14 +289,6 @@ test_localhost_gateway_response_should_contain \
308
289
" http://$DNSLINK_FQDN .ipns.localhost:$GWAY_PORT " \
309
290
" $CID_VAL "
310
291
311
- # api.localhost/api
312
-
313
- # Note: we use DIR_CID so refs -r returns some CIDs for child nodes
314
- test_localhost_gateway_response_should_contain \
315
- " request for api.localhost returns API response" \
316
- " http://api.localhost:$GWAY_PORT /api/v0/refs?arg=$DIR_CID &r=true" \
317
- " Ref"
318
-
319
292
# # ============================================================================
320
293
# # Test DNSLink inlining on HTTP gateways
321
294
# # ============================================================================
@@ -518,54 +491,6 @@ test_hostname_gateway_response_should_contain \
518
491
" http://127.0.0.1:$GWAY_PORT " \
519
492
" Location: http://${ED25519_IPNS_IDv1} .ipns.example.com/"
520
493
521
- # API on subdomain gateway example.com
522
- # ============================================================================
523
-
524
- # present at the root domain
525
- test_hostname_gateway_response_should_contain \
526
- " request for example.com/api/v0/refs returns expected payload when /api is on Paths whitelist" \
527
- " example.com" \
528
- " http://127.0.0.1:$GWAY_PORT /api/v0/refs?arg=${DIR_CID} &r=true" \
529
- " Ref"
530
-
531
- # not mounted on content root subdomains
532
- test_hostname_gateway_response_should_contain \
533
- " request for {cid}.ipfs.example.com/api returns data if present on the content root" \
534
- " $DIR_CID .ipfs.example.com" \
535
- " http://127.0.0.1:$GWAY_PORT /api/file.txt" \
536
- " I am a txt file"
537
-
538
- test_hostname_gateway_response_should_contain \
539
- " request for {cid}.ipfs.example.com/api/v0/refs returns 404" \
540
- " $CIDv1 .ipfs.example.com" \
541
- " http://127.0.0.1:$GWAY_PORT /api/v0/refs?arg=${DIR_CID} &r=true" \
542
- " 404 Not Found"
543
-
544
- # disable /api on example.com
545
- ipfs config --json Gateway.PublicGateways ' {
546
- "example.com": {
547
- "UseSubdomains": true,
548
- "Paths": ["/ipfs", "/ipns"]
549
- }
550
- }' || exit 1
551
- # restart daemon to apply config changes
552
- test_kill_ipfs_daemon
553
- test_launch_ipfs_daemon_without_network
554
-
555
- # not mounted at the root domain
556
- test_hostname_gateway_response_should_contain \
557
- " request for example.com/api/v0/refs returns 404 if /api not on Paths whitelist" \
558
- " example.com" \
559
- " http://127.0.0.1:$GWAY_PORT /api/v0/refs?arg=${DIR_CID} &r=true" \
560
- " 404 Not Found"
561
-
562
- # not mounted on content root subdomains
563
- test_hostname_gateway_response_should_contain \
564
- " request for {cid}.ipfs.example.com/api returns data if present on the content root" \
565
- " $DIR_CID .ipfs.example.com" \
566
- " http://127.0.0.1:$GWAY_PORT /api/file.txt" \
567
- " I am a txt file"
568
-
569
494
# DNSLink: <dnslink-fqdn>.ipns.example.com
570
495
# (not really useful outside of localhost, as setting TLS for more than one
571
496
# level of wildcard is a pain, but we support it if someone really wants it)
0 commit comments