- Best nginx configuration for improved security(and performance)
- How To Secure Nginx with Let's Encrypt on Ubuntu 16.04 | DigitalOcean
- HSTS (with Nginx) does not work properly
- How To Set Up Nginx with HTTP/2 Support on Ubuntu 16.04 | DigitalOcean
- How To Increase PageSpeed Score By Changing Your Nginx Configuration on Ubuntu 16.04 | DigitalOcean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const workboxConfig = { | |
...defaultInjectConfig, | |
swSrc: path.join(__dirname, "src", "custom-sw.js"), | |
importWorkboxFrom: "local" // Add this propertie | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function register() { | |
// Some validations here | |
window.addEventListener('load', () => { | |
const swUrl = `${process.env.PUBLIC_URL}/custom-sw.js`; // In this line | |
... | |
} | |
// Another stuffs here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://developers.google.com/web/tools/workbox/guides/configure-workbox | |
workbox.core.setLogLevel(workbox.core.LOG_LEVELS.debug); | |
self.addEventListener('install', event => event.waitUntil(self.skipWaiting())); | |
self.addEventListener('activate', event => event.waitUntil(self.clients.claim())); | |
// We need this in Webpack plugin (refer to swSrc option): https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_injectmanifest_config | |
workbox.precaching.precacheAndRoute(self.__precacheManifest); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
"start": "react-app-rewired start", | |
"build": "react-app-rewired build", | |
"test": "react-app-rewired test --env=jsdom", | |
}, | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {rewireWorkboxInject, defaultInjectConfig} = require('react-app-rewire-workbox'); | |
const path = require('path'); | |
module.exports = function override(config, env) { | |
if (env === "production") { | |
console.log("Production build - Adding Workbox for PWAs"); | |
// Extend the default injection config with required swSrc | |
const workboxConfig = { | |
...defaultInjectConfig, | |
swSrc: path.join(__dirname, 'src', 'custom-sw.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//REF: https://medium.com/technical-credit/using-prettier-with-vs-code-and-create-react-app-67c2449b9d08 | |
//Options: https://prettier.io/docs/en/options.html | |
{ | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"semi": false | |
} |
Una extensión cifrada del protocolo HTTP tradicional. Para realizar este cifrado, cada conexión con HTTP se envía sobre una capa SSL o TLS. El objetivo de usar HTTPS responde a dos cuestiones:
- Certificar que la web visitada es legítima
- Se mantiene la integridad y la privacidad de los datos de conexión.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- manifest --> | |
<link rel="manifest" href="manifest.json"> | |
<!-- favicon --> | |
<link rel="shortcut icon" sizes="16x16 32x32 48x48 64x64" href="favicon.ico"> | |
<!-- iOS --> | |
<link rel="apple-touch-icon" href="touch-icon-iphone.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png"> | |
<link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png"> |