无法使用https中的静态资源转到网址

时间:2017-12-31 04:06:14

标签: javascript html assets service-worker create-react-app

https://redirect.netlify.com/ 第一个链接有效,但不是第二个。为什么呢?

import React from "react";

const App = () => (
  <div>
    <p>
      <a href="http://redirect.netlify.com/manifest.json">
        http://redirect.netlify.com/manifest.json
      </a>
    </p>
    <p>
      <a href="https://redirect.netlify.com/manifest.json">
        https://redirect.netlify.com/manifest.json
      </a>
    </p>
  </div>
);

export default App;

服务人员代码:https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/src/registerServiceWorker.js

0 个答案:

没有答案