जीजीपी में Portus को एनजीएक्सएक्स इंजेक्शन लोड बैलेंसर के साथ लागू किया गया। पोर्टस भार अप ठीक, लेकिन जब अनुप्रयोग का उपयोग और रूपों मैं निम्नलिखित त्रुटि मिलती है में से कुछ को भरने की कोशिश कर रहा:रेल ऐप के लिए क्यूबर्नेट में मिश्रित सामग्री त्रुटि nginx ingress
VM798:1 Mixed Content: The page at ' https://staging.foo.bar/admin/registries/new ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ' http://staging.foo.bar//api/v1/registries/validate?name=devreg&hostname=staging-foo-barregistry%3A5000&external_hostname=&use_ssl=false&force=false&only%5B%5D=hostname '. This request has been blocked; the content must be served over HTTPS.
Nginx विन्यास: https://github.com/kubic-project/caasp-services/blob/master/contrib/helm-charts/portus/templates/nginx-configmap.yaml
पर्यावरण:
- में Kubernetes जीसीपी
- हेल्म
- एसएसएल के माध्यम से तैनात सभी संसाधन क्यूब-लेगो द्वारा प्रदान किया गया है अंगूर एपीआई मणि
- अंगूर के साथ
- रेल एप्लिकेशन एपीआई के रूप में निम्नानुसार mounts:
mount API::RootAPI => "/"
तो मैं मैनुअल http कॉल के लिए कोड की जांच सुनिश्चित कर दिया है और कुछ भी नहीं देखा था। और मैंने एक दिन अब रेल डॉक्स और nginx दस्तावेज़ों के माध्यम से खोदने की कोशिश की है ताकि कुछ ऐप एसएसएल और एपीआई के साथ ठीक से लोड हो सकें, उसी नियम का पालन न करने के लिए
----- अपडेट 1 ------ आगे की जांच के बाद, ऐसा लगता है कि इसमें वू सत्यापनकर्ता के साथ कुछ करना है।
curl ' http://staging.foo.bar//api/v1/registries/validate?name=devreg&hostname=st&external_hostname=&use_ssl=false&force=false&only%5B%5D=name ' -X OPTIONS -H 'Access-Control-Request-Method: GET' -H 'Origin: https://staging.foo.bar ' -H 'Access-Control-Request-Headers: x-csrf-token' --compressed
और यह जड़ यूआरएल यहाँ बुलाया जा रहा है की तरह लग रहा: जैसा कि ऊपर उल्लेख
javascript:
window.API_ROOT_URL = '#{root_url}';
root_url/पर सेट है डेवलपर उपकरण जाँच हो रही है निम्नलिखित का पता चला।
हालांकि, विश्लेषण करने Vue कोड करीब revels:
Vue.http.options.root = window.API_ROOT_URL;
Vue.http.interceptors.push((_request, next) => {
window.$.active = window.$.active || 0;
window.$.active += 1;
next(() => {
window.$.active -= 1;
});
});
Vue.http.interceptors.push((request, next) => {
if ($.rails) {
// eslint-disable-next-line no-param-reassign
request.headers.set('X-CSRF-Token', $.rails.csrfToken());
}
next();
});
// we are not a SPA and when user clicks on back/forward
// we want the page to be fully reloaded to take advantage of
// the url query params state
window.onpopstate = function (e) {
// phantomjs seems to trigger an oppopstate event
// when visiting pages, e.state is always null and
// in our component we set an empty string
if (e.state !== null) {
window.location.reload();
}
};
Vue.config.productionTip = process.env.NODE_ENV !== 'production';
पैरामीटर क्वेरी
params do
requires :name,
using: API::Entities::Registries.documentation.slice(:name)
requires :hostname,
using: API::Entities::Registries.documentation.slice(:hostname)
optional :external_hostname,
using: API::Entities::Registries.documentation.slice(:external_hostname)
requires :use_ssl,
using: API::Entities::Registries.documentation.slice(:use_ssl)
optional :only, type: Array[String]
end
उपयोग_एसएसएल को पैरा में बुलाया जा रहा है और यह अभी भी काम नहीं करना प्रतीत होता है – niharvey