Skip to content

Commit 32d9b75

Browse files
brikouarunoda
authored andcommittedSep 1, 2017
Use https to prevent mixed content when served over https (vercel#2741)
1 parent a779d83 commit 32d9b75

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎examples/with-static-export/next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fetch = require('isomorphic-fetch')
33
module.exports = {
44
async exportPathMap () {
55
// we fetch our list of posts, this allow us to dynamically generate the exported pages
6-
const response = await fetch('http://jsonplaceholder.typicode.com/posts?_page=1')
6+
const response = await fetch('https://jsonplaceholder.typicode.com/posts?_page=1')
77
const postList = await response.json()
88

99
// tranform the list of posts into a map of pages with the pathname `/post/:id`

‎examples/with-static-export/pages/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Post from '../components/post'
77
export default class extends Component {
88
static async getInitialProps () {
99
// fetch list of posts
10-
const response = await fetch('http://jsonplaceholder.typicode.com/posts?_page=1')
10+
const response = await fetch('https://jsonplaceholder.typicode.com/posts?_page=1')
1111
const postList = await response.json()
1212
return { postList }
1313
}

‎examples/with-static-export/pages/post.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import fetch from 'isomorphic-fetch'
66
export default class extends Component {
77
static async getInitialProps ({ query }) {
88
// fetch single post detail
9-
const response = await fetch(`http://jsonplaceholder.typicode.com/posts/${query.id}`)
9+
const response = await fetch(`https://jsonplaceholder.typicode.com/posts/${query.id}`)
1010
const post = await response.json()
1111
return { ...post }
1212
}

0 commit comments

Comments
 (0)
Please sign in to comment.