This file contains hidden or 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
files: | |
"/etc/httpd/conf.d/wsgi_custom.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
WSGIApplicationGroup %{GLOBAL} |
This file contains hidden or 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
container_commands: | |
01mkdir: | |
command: "mkdir -p /home/wsgi" | |
02chown: | |
command: "chown wsgi:wsgi /home/wsgi" | |
03chmod: | |
command: "chmod u+xwr -R /home/wsgi" | |
04chmod: | |
command: "chmod u+xwr -R /opt/python/ondeck/app" | |
05downloadmodel: |
This file contains hidden or 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
packages: | |
yum: | |
gcc: [] | |
gcc-c++: [] | |
libXrandr: [] | |
libXcursor: [] | |
pango: [] | |
cairo: [] | |
cairo-gobject: [] | |
libXinerama: [] |
This file contains hidden or 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
Grover.configure do |config| | |
config.use_png_middleware = true | |
config.options = { | |
viewport: { | |
width: 1024, | |
height: 768 | |
}, | |
prefer_css_page_size: true, | |
emulate_media: 'screen', | |
cache: true, |
This file contains hidden or 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
Rails.application.config.content_security_policy do |policy| | |
policy.script_src :self, 'https://www.googletagmanager.com', 'https://www.google-analytics.com' | |
end |
This file contains hidden or 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
... | |
<head> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script> | |
<%= javascript_include_tag 'analytics', async: true %> | |
... |
This file contains hidden or 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
window.dataLayer = window.dataLayer || [] | |
function gtag() { dataLayer.push(arguments) } | |
gtag('js', new Date()) | |
gtag('config', 'GA_MEASUREMENT_ID') |
This file contains hidden or 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
window.dataLayer = window.dataLayer || [] | |
function gtag() { dataLayer.push(arguments) } | |
gtag('js', new Date()) | |
const trackGoogleAnalytics = (event) => { | |
gtag('config', 'GA_MEASUREMENT_ID', { | |
'cookie_flags': 'max-age=7200;secure;samesite=none' | |
}) | |
} |
This file contains hidden or 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 unravel = async (url) => { | |
const response = await fetch(url) | |
return response | |
} | |
export default async (req, res) => { | |
const response = await unravel(req.query.url) | |
res.statusCode = 200 | |
res.setHeader('Content-Type', 'application/json') | |
res.end(JSON.stringify({ response: response })) |
This file contains hidden or 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 response = await fetch('http://google.com', {redirect: 'manual'}) | |
response.status | |
// => 301 | |
response.headers.get('Location') | |
// => http://www.google.com |