1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Use https to prevent mixed content when served over https (#2741)

This commit is contained in:
Brikou CARRE 2017-09-01 08:24:03 +02:00 committed by Arunoda Susiripala
parent a779d830bd
commit 32d9b75d55
3 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ const fetch = require('isomorphic-fetch')
module.exports = {
async exportPathMap () {
// we fetch our list of posts, this allow us to dynamically generate the exported pages
const response = await fetch('http://jsonplaceholder.typicode.com/posts?_page=1')
const response = await fetch('https://jsonplaceholder.typicode.com/posts?_page=1')
const postList = await response.json()
// tranform the list of posts into a map of pages with the pathname `/post/:id`

View file

@ -7,7 +7,7 @@ import Post from '../components/post'
export default class extends Component {
static async getInitialProps () {
// fetch list of posts
const response = await fetch('http://jsonplaceholder.typicode.com/posts?_page=1')
const response = await fetch('https://jsonplaceholder.typicode.com/posts?_page=1')
const postList = await response.json()
return { postList }
}

View file

@ -6,7 +6,7 @@ import fetch from 'isomorphic-fetch'
export default class extends Component {
static async getInitialProps ({ query }) {
// fetch single post detail
const response = await fetch(`http://jsonplaceholder.typicode.com/posts/${query.id}`)
const response = await fetch(`https://jsonplaceholder.typicode.com/posts/${query.id}`)
const post = await response.json()
return { ...post }
}