Quellcode durchsuchen

added some todos and edited the license

svcs vor 1 Jahr
Ursprung
Commit
2ab81ff6cf
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 2 2
      LICENSE
  2. 3 0
      pkg/controller.go

+ 2 - 2
LICENSE

@@ -207,8 +207,8 @@ If you develop a new program, and you want it to be of the greatest possible use
 
 To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
 
-<one line to give the program's name and a brief idea of what it does.> 
-Copyright (C) <year> <name of author>
+webripper, an extendable web proxy that allows for the modification and rapid proxying of web servers
+Copyright (C) 2024, Russell Hrubesky
 
 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 

+ 3 - 0
pkg/controller.go

@@ -11,6 +11,7 @@ import (
 	"golang.org/x/net/publicsuffix"
 )
 
+// TODO: does tihs need to be a configuration thing? How would i handle doing rewrite rules?
 var staticRoutes = [...]string{
 	"/siteaudit/i18n/messages_en",
 	"/siteaudit/index/",
@@ -121,6 +122,8 @@ func (c *Controller) Get(ctx *gin.Context) {
 	if incomingPath == "/_compatibility/traffic/overview/" {
 		ctx.Header("Location", "https://sem.bunnytools.shop/analytics/traffic/overview/ebay.com")
 	}
+
+	// TODO: this should also honestly be a configuration thing, so that i can extend page modifications
 	newBody := strings.ReplaceAll(string(data), "\"srf-browser-unhappy\"", "\"srf-browser-unhappy\" style=\"display:none;\"")
 	newBody = strings.ReplaceAll(newBody, "\"srf-navbar__right\"", "\"srf-navbar__right\" style=\"display:none;\"")
 	newBody = strings.ReplaceAll(newBody, "<footer", "<footer style=\"display:none;\"")