Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Netlify error-mixed Content, The page was loaded over HTTPS, but requested a HTTP insecure script

everyone,

I deployed my vue-cli website project to Netlify, but when I opened the website, got this error: Mixed Content: The page at 'https://xxxx.netlify.app/' was loaded over HTTPS, but requested an insecure script 'http://yyyy/something.js'. This request has been blocked; the content must be served over HTTPS.

Do you guys have similar problems and got any suggestions for me, I appreciate that.

I know that browser has this same-origin security policy to keep user data safe, but my website is a client-side web, I do not have control of the server-side, which means I cannot use CORS. And I send not only GET requests, so JSONP cannot be the solution.

The example case is like: Visitor was at 'https://mywebsite.netlify.app/#/login', after visitor input username and password, click login button, the userAccountLogin function will be called, and send the request:

//-------------in login.js---------------------
import request from 'path here'

const userAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}


// ----------in request.js--------------------
import axios from 'axios'

const baseURL = 'http://apiserver.net/'

const instance = axios.create({
  baseURL,
  timeout: 5000
})

export default (url, method, submitData) => {
  return instance({
    url,
    method,
    [method.toLowerCase() === 'get' ? 'params' : 'data']: submitData
  })
}

The project works well at http://localhost:8080, but needs to solve the cross-origin problem.

Thank you all :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

//-------------in login.js---------------------
import request from 'path here'

const userAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}


// ----------in request.js--------------------
import axios from 'axios'

const baseURL = 'http://apiserver.net/'

const instance = axios.create({
  baseURL,
  timeout: 5000
})

export default (url, method, submitData) => {
  return instance({
    url,
    method,
    [method.toLowerCase() === 'get' ? 'params' : 'data']: submitData
  })
}

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!