新增加的功能模块接口,访问显示401,如何配置

提问 2 707
邮箱用户_su9rp
邮箱用户_su9rp LV5 2021年8月16日 22:36 发表
点击群号免费加入社区交流群:367346704
<ol role="group" style="min-width: 0px; min-height: 0px; list-style-type: none; padding-left: 10px; padding-bottom: 5px; border-bottom: 1px solid rgb(224, 224, 224); font-family: &quot;Segoe UI&quot;, Tahoma, sans-serif; font-size: 12px;"><li role="treeitem" style="color: rgb(34, 34, 34); min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Request URL: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">http://localhost:9527/api/admin/test/queryTest?currentPage=1&amp;pageSize=10&amp;sorter=createTime_descend</div></li><li role="treeitem" style="color: rgb(34, 34, 34); min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Request Method: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">GET</div></li><li role="treeitem" style="min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><span style="color: rgb(255, 0, 0); font-weight: bold;"><div style="min-width: 0px; min-height: 0px; display: inline-block; margin-right: 0.25em; vertical-align: top; white-space: pre-wrap;">Status Code: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><span is="dt-icon-label" style="min-width: 0px; min-height: 0px; flex: 0 0 auto;"><span is="ui-icon" style="min-width: 0px; min-height: 0px; display: inline-block; flex-shrink: 0; background-position: var(--spritesheet-position); background-image: url(&quot;Images/smallIcons.svg&quot;); margin-right: 4px; --spritesheet-position:0px 30px; width: 10px; height: 10px;"></span><slot style="min-width: 0px; min-height: 0px;"></slot></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">401 Unauthorized</div></span></li><li role="treeitem" style="color: rgb(34, 34, 34); min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Remote Address: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">127.0.0.1:9527</div></li><li role="treeitem" tabindex="0" aria-selected="true" style="color: var(--selection-fg-color); min-width: 0px; min-height: 12px; outline-width: 0px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; position: absolute; inset: 0px; z-index: -1; margin-left: -10000px; background-color: var(--selection-bg-color); color: inherit;"></div><div style="min-width: 0px; min-height: 0px; color: inherit; display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Referrer Policy: </div><span style="min-width: 0px; min-height: 0px; user-select: none; color: inherit;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px; color: inherit;">no-referrer-when-downgrade</div></li><li role="treeitem" tabindex="0" aria-selected="true" style="min-width: 0px; min-height: 12px; outline-width: 0px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;"><span style="color: inherit;"> </span><ol role="group" style="min-width: 0px; min-height: 0px; list-style-type: none; padding-left: 10px; padding-bottom: 5px; border-bottom: 1px solid rgb(224, 224, 224); font-family: &quot;Segoe UI&quot;, Tahoma, sans-serif; white-space: normal;"><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Accept: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">application/json, text/plain, */*</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Accept-Encoding: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">gzip, deflate, br</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Accept-Language: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">zh-CN,zh;q=0.9</div></li><li role="treeitem" style="min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><span style="font-weight: bold; color: rgb(255, 0, 0);"><div style="min-width: 0px; min-height: 0px; display: inline-block; margin-right: 0.25em; vertical-align: top; white-space: pre-wrap;">Authorization: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">Bearer 8539e545-f95d-4139-9d4a-5ef24f666c13</div></span></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Connection: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">keep-alive</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Cookie: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">token=8539e545-f95d-4139-9d4a-5ef24f666c13</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Host: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">localhost:9527</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Referer: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">http://localhost:9527/mscodevue/</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">RoleCode: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">ROLE_ADMIN,ROLE_DEV,ROLE_MANAGER,ROLE_TEST</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Sec-Fetch-Dest: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">empty</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Sec-Fetch-Mode: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">cors</div></li><li role="treeitem" style="color: inherit; min-width: 0px; min-height: 12px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; color: rgb(84, 84, 84); display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">Sec-Fetch-Site: </div><span style="min-width: 0px; min-height: 0px; user-select: none;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px;">same-origin</div></li><li role="treeitem" tabindex="0" aria-selected="true" style="color: var(--selection-fg-color); min-width: 0px; min-height: 12px; outline-width: 0px; text-overflow: ellipsis; white-space: nowrap; position: relative; display: block; align-items: center; padding-left: 5px; line-height: 20px; margin-top: 1px; margin-left: 10px;"><div style="min-width: 0px; min-height: 0px; position: absolute; inset: 0px; z-index: -1; margin-left: -10000px; background-color: var(--selection-bg-color); color: inherit;"></div><div style="min-width: 0px; min-height: 0px; color: inherit; display: inline-block; margin-right: 0.25em; font-weight: bold; vertical-align: top; white-space: pre-wrap;">User-Agent: </div><span style="min-width: 0px; min-height: 0px; user-select: none; color: inherit;"></span><div style="min-width: 0px; min-height: 0px; font-family: Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, monospace; white-space: pre-wrap; display: inline; margin-right: 1em; word-break: break-all; margin-top: 1px; color: inherit;">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 SLBrowser/7.0.0.6241 SLBChan/21</div></li></ol><span style="color: inherit;"> </span></div></li></ol>
收藏(0)  分享
相关标签: 讨论
2个回复
  • 站长
    2021年8月17日 09:02
    去接口权限界面配置URL方法的授权。
    1 0
  • 尐二郎
    2021年8月19日 14:09
    需要在gateway进行路由配置。前端调取时,还需对接口进行授权。
    0 0