-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exclude frontend and backend folders from deploying and add .htaccess…
… to the project
- Loading branch information
1 parent
96e67ec
commit 6432930
Showing
2 changed files
with
135 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION BEGIN | ||
PassengerAppRoot "/home/tbtouris/api" | ||
PassengerBaseURI "/" | ||
PassengerNodejs "/home/tbtouris/nodevenv/api/16/bin/node" | ||
PassengerAppType node | ||
PassengerStartupFile build/server.js | ||
PassengerAppLogFile "/home/tbtouris/api/logs/passenger.log" | ||
# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION END | ||
# ---------------------------------------------------------------------- | ||
# | ETags | | ||
# ---------------------------------------------------------------------- | ||
|
||
# Remove `ETags` as resources are sent with far-future expires headers. | ||
# | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag | ||
# https://developer.yahoo.com/performance/rules.html#etags | ||
# https://tools.ietf.org/html/rfc7232#section-2.3 | ||
|
||
# `FileETag None` doesn't work in all cases. | ||
<IfModule mod_headers.c> | ||
Header unset ETag | ||
</IfModule> | ||
|
||
FileETag None | ||
|
||
# ---------------------------------------------------------------------- | ||
# | Cache expiration | | ||
# ---------------------------------------------------------------------- | ||
|
||
# Serve resources with a far-future expiration date. | ||
# | ||
# (!) If you don't control versioning with filename-based cache busting, you | ||
# should consider lowering the cache times to something like one week. | ||
# | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires | ||
# https://httpd.apache.org/docs/current/mod/mod_expires.html | ||
|
||
<IfModule mod_expires.c> | ||
ExpiresActive on | ||
ExpiresDefault "access plus 1 month" | ||
|
||
# CSS | ||
|
||
ExpiresByType text/css "access plus 1 year" | ||
|
||
# Data interchange | ||
|
||
ExpiresByType application/atom+xml "access plus 1 hour" | ||
ExpiresByType application/rdf+xml "access plus 1 hour" | ||
ExpiresByType application/rss+xml "access plus 1 hour" | ||
|
||
ExpiresByType application/json "access plus 0 seconds" | ||
ExpiresByType application/ld+json "access plus 0 seconds" | ||
ExpiresByType application/schema+json "access plus 0 seconds" | ||
ExpiresByType application/geo+json "access plus 0 seconds" | ||
ExpiresByType application/xml "access plus 0 seconds" | ||
ExpiresByType text/calendar "access plus 0 seconds" | ||
ExpiresByType text/xml "access plus 0 seconds" | ||
|
||
# Favicon (cannot be renamed!) and cursor images | ||
|
||
ExpiresByType image/vnd.microsoft.icon "access plus 1 week" | ||
ExpiresByType image/x-icon "access plus 1 week" | ||
|
||
# HTML | ||
|
||
ExpiresByType text/html "access plus 0 seconds" | ||
|
||
#JavaScript | ||
|
||
ExpiresByType application/javascript "access plus 1 year" | ||
ExpiresByType application/x-javascript "access plus 1 year" | ||
ExpiresByType text/javascript "access plus 1 year" | ||
|
||
# Manifest files | ||
|
||
ExpiresByType application/manifest+json "access plus 1 week" | ||
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" | ||
ExpiresByType text/cache-manifest "access plus 0 seconds" | ||
|
||
# Markdown | ||
|
||
ExpiresByType text/markdown "access plus 0 seconds" | ||
|
||
# Media files | ||
|
||
ExpiresByType audio/ogg "access plus 1 year" | ||
ExpiresByType image/apng "access plus 1 year" | ||
ExpiresByType image/bmp "access plus 1 year" | ||
ExpiresByType image/gif "access plus 1 year" | ||
ExpiresByType image/jpeg "access plus 1 year" | ||
ExpiresByType image/png "access plus 1 year" | ||
ExpiresByType image/svg+xml "access plus 1 year" | ||
ExpiresByType image/webp "access plus 1 year" | ||
ExpiresByType video/mp4 "access plus 1 year" | ||
ExpiresByType video/ogg "access plus 1 year" | ||
ExpiresByType video/webm "access plus 1 year" | ||
|
||
# Web fonts | ||
|
||
# Collection | ||
ExpiresByType font/collection "access plus 1 month" | ||
|
||
# Embedded OpenType (EOT) | ||
ExpiresByType application/vnd.ms-fontobject "access plus 1 month" | ||
ExpiresByType font/eot "access plus 1 month" | ||
|
||
# OpenType | ||
ExpiresByType font/opentype "access plus 1 month" | ||
ExpiresByType font/otf "access plus 1 month" | ||
|
||
# TrueType | ||
ExpiresByType application/x-font-ttf "access plus 1 month" | ||
ExpiresByType font/ttf "access plus 1 month" | ||
|
||
# Web Open Font Format (WOFF) 1.0 | ||
ExpiresByType application/font-woff "access plus 1 month" | ||
ExpiresByType application/x-font-woff "access plus 1 month" | ||
ExpiresByType font/woff "access plus 1 month" | ||
|
||
# Web Open Font Format (WOFF) 2.0 | ||
ExpiresByType application/font-woff2 "access plus 1 month" | ||
ExpiresByType font/woff2 "access plus 1 month" | ||
|
||
# Other | ||
|
||
ExpiresByType text/x-cross-domain-policy "access plus 1 week" | ||
|
||
</IfModule> | ||
|
||
Header set Content-Security-Policy-Report-Only "default-src 'self'; script-src 'report-sample' 'self'; style-src 'report-sample' 'self' https://fonts.googleapis.com; object-src 'none'; base-uri 'self'; connect-src 'self'; font-src 'self' https://fonts.gstatic.com; frame-src 'self' https://www.google.com; img-src 'self'; manifest-src 'self'; media-src 'self'; report-uri https://642db2a3f1e3671a2913583b.endpoint.csper.io/?v=1; worker-src 'none';" |