extjs - 访问 Nexus 配置 - Ext.JSON.decode() : You're trying to decode an invalid JSON String:

标签 extjs nexus

使用 Sonatype Nexus,我仅在访问 /nexus/#admin/support/status 时收到此错误消息.

Ext.JSON.decode(): You're trying to decode an invalid JSON String: Nexus Repository Manager (new Image).src="http://localhost/nexus/static/rapture/resources/favicon.ico?_v=3.17.0-01&_e=OSS"</script> function progressMessage(msg) { if (console && console.log) { console.log(msg); } document.getElementById('loading-msg').innerHTML=msg; } Loading ... progressMessage('Loading baseapp-prod.js'); progressMessage('Loading extdirect-prod.js'); progressMessage('Loading bootstrap.js'); progressMessage('Loading d3.v4.min.js'); progressMessage('Loading nexus-rapture-prod.js'); progressMessage('Loading nexus-blobstore-s3-prod.js'); progressMessage('Loading nexus-rutauth-plugin-prod.js'); progressMessage('Loading nexus-coreui-plugin-prod.js'); progressMessage('Loading nexus-proui-plugin-prod.js'); progressMessage('Loading nexus-repository-pypi-prod.js'); progressMessage('Loading nexus-repository-maven-prod.js'); progressMessage('Loading nexus-repository-npm-prod.js'); progressMessage('Loading nexus-onboarding-plugin-prod.js'); progressMessage('Loading nexus-repository-nuget-prod.js'); progressMessage('Loading nexus-repository-rubygems-prod.js'); progressMessage('Loading nexus-repository-docker-prod.js'); progressMessage('Loading app.js'); progressMessage('Initializing ...');



我正在使用反向代理 (nginx) 来分配 RUT header 以进行授权,如下所示:
server { 
    listen 80; server_name localhost;

    location /auth { 
        proxy_set_header Host $host; 
        proxy_pass_request_body off; 
        proxy_set_header Content-Length ""; 
        proxy_pass http://nexus-proxy:8080; 
    }

    location /nexus { 
        auth_request /auth; 
        auth_request_set $user $upstream_http_x_forwarded_user;

        proxy_set_header Host $host; 
        proxy_set_header X-Real-IP $remote_addr; 
        proxy_set_header X-Forwarded-For $remote_addr; 
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-User $user; 
        proxy_pass http://nexus:8081; 
    }
}

在成功的身份验证中,一个 200 responsecode 和 X-Forwarded-User 被发送到标题和正文中的一个空 JSON 对象(否则在主页中提示 nexus)。

我想知道这个空的 JSON 对象是否可能是我在 nexus 状态页面上收到此消息的原因,以及我可以做些什么来避免它。对于 Nexus Ext js,是否有 JSON-response-body 必须遵循的预定义格式?

最佳答案

迟到的答案,以防它可能对某人有所帮助。

我发现我的广告拦截器也导致了这个问题
enter image description here

我不得不禁用我的添加拦截器 uBlock origin在我的情况下,修复它

关于extjs - 访问 Nexus 配置 - Ext.JSON.decode() : You're trying to decode an invalid JSON String:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56953741/

相关文章:

dom - 追踪 DOM 元素 id 回到它的 ExtJs 组件

java - 使用 Ivy 和私有(private)公司存储库时,我应该把我的凭据放在哪里?

javascript - ExtJS Grid,填充输入字段时允许空格键

css - 如何自定义Ext.menu.Menu的方向

javascript - ExtJS:启动 HtmlEditor 默认为源

java - Maven 版本 :update not updating the given version, 与存储库进行比较并更新到最新版本而不是给定版本

scala - sbt:未经授权发布到公司 Nexus 存储库

maven - 如何使用 NEXUS 配置 GITLAB CI?

在 MANIFEST 文件中使用 Maven 程序集的 Maven SNAPSHOT jar 文件名不一致

javascript - ExtJS 重复存储记录