Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/views/gemfiles/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<% content_for :title, "Audit Tool - Report ##{@alpha_id}" %>
<% content_for :description, "Report ##{@alpha_id} - #{@vulnerabilities_count} Vulnerabilities found on your file" %>

<% content_for :script do %>
<script>
$('html, body').animate({
Expand Down
3 changes: 3 additions & 0 deletions app/views/home/privacy.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<% content_for :title, "Privacy Policy | FastRuby.io Audit Tool" %>
<% content_for :description, "How the FastRuby.io Audit Tool collects, uses, and protects information about you." %>

<div class="header" id="header_privacy">
<h1>Privacy Policy</h1>
</div>
Expand Down
9 changes: 2 additions & 7 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<% if controller_name == 'gemfiles' %>
<title>Audit Tool - Report #<%= @alpha_id %></title>
<meta name="description" content="Report #<%= @alpha_id %> - <%= @vulnerabilities_count %> Vulnerabilities found on your file"/>
<% else %>
<title>Audit Tool</title>
<meta name="description" content="Upload your Gemfile.lock to find vulnerabilities in your application"/>
<% end %>
<title><%= content_for?(:title) ? yield(:title) : t('meta.default_title') %></title>
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : t('meta.default_description') %>"/>


<%= csrf_meta_tags %>
Expand Down
4 changes: 4 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.week.to_i}"
}

# Compress JavaScripts and CSS.
config.assets.js_compressor = :terser
# config.assets.css_compressor = :sass
Expand Down
3 changes: 3 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@

en:
hello: "Hello world"
meta:
default_title: "Free Gemfile.lock Vulnerability Scanner | FastRuby.io"
default_description: "Upload your Gemfile.lock to find vulnerabilities in your application"
Loading