Add privacy policy

This commit is contained in:
Joakim Hellsén 2024-02-04 21:41:48 +01:00
commit e45f9b3bae
4 changed files with 60 additions and 18 deletions

View file

@ -43,6 +43,7 @@ func main() {
log.Println("Starting FeedVault...")
// Scrape the bad URLs in the background
// TODO: Run this in a goroutine
scrapeBadURLs()
// Create a new router
@ -55,9 +56,9 @@ func main() {
r.Get("/", IndexHandler)
r.Get("/api", ApiHandler)
r.Get("/about", AboutHandler)
r.Get("/donate", DonateHandler)
r.Get("/feeds", FeedsHandler)
r.Get("/privacy", PrivacyHandler)
r.Post("/add", AddFeedHandler)
r.Handle("/static/*", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
@ -71,6 +72,7 @@ func main() {
func scrapeBadURLs() {
// TODO: We should only scrape the bad URLs if the file has been updated
// TODO: Use brotli compression https://gitlab.com/malware-filter/urlhaus-filter#compressed-version
filterListURLs := []string{
"https://malware-filter.gitlab.io/malware-filter/phishing-filter-dnscrypt-blocked-names.txt",
"https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-dnscrypt-blocked-names-online.txt",
@ -214,6 +216,10 @@ func FeedsHandler(w http.ResponseWriter, _ *http.Request) {
renderPage(w, "Feeds", "Feeds Page", "feeds, page", "TheLovinator", "http://localhost:8000/feeds", "feeds")
}
func PrivacyHandler(w http.ResponseWriter, _ *http.Request) {
renderPage(w, "Privacy", "Privacy Page", "privacy, page", "TheLovinator", "http://localhost:8000/privacy", "privacy")
}
// Run some simple validation on the URL
func validateURL(feed_url string) error {
// Check if URL starts with http or https

View file

@ -1,16 +0,0 @@
{{ define "content" }}
<h2>Feeds to archive</h2>
<p>
Input the URLs of the feeds you wish to archive below. You can add as many as needed, and access them through the website or API. Alternatively, include links to .opml files, and the feeds within will be archived.
</p>
<form action="/add" method="post">
<textarea id="urls" name="urls" rows="5" cols="50" required></textarea>
<button type="submit">Add feeds</button>
</form>
<br>
<p>You can also upload .opml files containing the feeds you wish to archive:</p>
<form enctype="multipart/form-data" method="post" action="/upload_opml">
<input type="file" name="file" id="file" accept=".opml" required>
<button type="submit">Upload OPML</button>
</form>
{{ end }}

View file

@ -68,7 +68,7 @@
<a href="mailto:hello@feedvault.se">hello@feedvault.se</a>
</div>
<div class="right">
<a href="">Terms of Service</a> | <a href="">Privacy Policy</a>
<a href="">Terms of Service</a> | <a href="/privacy">Privacy Policy</a>
</div>
</div>
</small>

52
templates/privacy.tmpl Normal file
View file

@ -0,0 +1,52 @@
{{ define "content" }}
<div class="container">
<article>
<header>
<h1>Privacy Policy</h1>
</header>
<p>
Last Updated:
<time datetime="2024-02-04">
February 4, 2024
</time>
</p>
<section>
<h2>Information Collection</h2>
<p>We gather the following data:</p>
<ul>
<li><strong>Log Files:</strong> These files contain details about your IP address, browser, and operating system.</li>
<ul>
<li>This information is collected for debugging purposes and to enhance website performance.</li>
<li>Log files are automatically removed after a specific timeframe.</li>
<li>They are not linked to any personal information, shared with third parties, or used for marketing purposes.</li>
<li>Furthermore, log files are not utilized to track your activity on other websites.</li>
</ul>
<li><strong>Cloudflare:</strong> We use Cloudflare to secure and optimize our website.</li>
<ul>
<li>Cloudflare may collect your IP address, cookies, and other data.</li>
<li>For more information, please review Cloudflare's <a href="https://www.cloudflare.com/privacypolicy/">privacy policy</a>.</li>
</ul>
</ul>
</section>
<section>
<h2>User Rights</h2>
<p>
You have the right to access, correct, or delete your information. Any privacy-related inquiries can be directed to us using the contact information provided at the end of this document.
</p>
</section>
<section>
<h2>Changes to the Privacy Policy</h2>
<p>
This privacy policy may be revised. You can review the revision history of this document on our GitHub repository <a href="https://github.com/TheLovinator1/FeedVault/blob/master/templates/privacy.tmpl">here</a>.
</p>
</section>
<section>
<h2>Contact Information</h2>
<p>
For privacy concerns or questions, you can reach us via email at <a href="mailto:hello@feedvault.se">hello@feedvault.se</a> or by creating an issue on our <a href="https://github.com/TheLovinator1/FeedVault/issues">GitHub repository</a>.
</p>
<p>Cloudflare's contact information can be found <a href="https://www.cloudflare.com/privacypolicy/">here</a>.</p>
</section>
</article>
</div>
{{ end }}