File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -895,8 +895,7 @@ class HttpAPIServer {
895895 final String ? domain = node.config['http' ]? ['api' ]? ['domain' ];
896896
897897 if (domain != null ) {
898- if (uri.host == 'localhost' ) {
899- } else if (uri.host == domain) {
898+ if (uri.host == domain) {
900899 if (request.uri.path == '/s5/p2p' ) {
901900 final socket = await WebSocketTransformer .upgrade (request);
902901
@@ -916,6 +915,8 @@ class HttpAPIServer {
916915 } else if (uri.host == 'docs.$domain ' ) {
917916 cid = CID .decode ('zrjD7xwmgP8U6hquPUtSRcZP1J1LvksSwTq4CPZ2ck96FHu' );
918917 checkAuth = false ;
918+ } else if ('.${uri .host }' .endsWith ('.$domain ' )) {
919+ cid = CID .decode (uri.host.split ('.' ).first);
919920 } else if (! ('.${uri .host }' ).endsWith ('.$domain ' )) {
920921 final cidStr = await node.resolveName (uri.host);
921922 cid = CID .decode (cidStr);
You can’t perform that action at this time.
0 commit comments