{"id":23107407,"url":"https://github.com/sineware/static-proxy","last_synced_at":"2025-04-03T22:43:16.881Z","repository":{"id":185221304,"uuid":"673186528","full_name":"Sineware/static-proxy","owner":"Sineware","description":"Static/caching crawling proxy with manually controlled updating.","archived":false,"fork":false,"pushed_at":"2023-08-25T01:53:37.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T10:31:27.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sineware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-01T04:23:05.000Z","updated_at":"2025-01-31T19:49:28.000Z","dependencies_parsed_at":"2025-02-09T10:39:58.167Z","dependency_job_id":null,"html_url":"https://github.com/Sineware/static-proxy","commit_stats":null,"previous_names":["sineware/static-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sineware%2Fstatic-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sineware%2Fstatic-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sineware%2Fstatic-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sineware%2Fstatic-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sineware","download_url":"https://codeload.github.com/Sineware/static-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092374,"owners_count":20882217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T01:13:56.931Z","updated_at":"2025-04-03T22:43:16.861Z","avatar_url":"https://github.com/Sineware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Sineware Static HTTP Proxy](https://github.com/Sineware/static-proxy)\nThis is a service that generates a static copy of a website locally, and serves it.\n\nSecure dynamic backends such as Wordpress from direct attacks with a controlled static version served to your clients.\n\n- Get it on [Docker Hub](https://hub.docker.com/r/sineware/static-proxy)\n\n## Environement\n```bash\nAPI_KEY=abc123 # API Key to access /sw-api/refresh endpoint (Authorization header with \"Bearer \u003ctoken\u003e\")\nUPSTREAM_URL=\"https://sineware.ca\" # Backend service public/application configured URL\nUPSTREAM_INTERNAL_URL=\"\" # Specifiy if Static Proxy should access the upstream service from a different URL (ex. bypass a load balancer)\nUPSTREAM_POST_URL=\"\" # URL to send POST JSON requests\n\nHOST_URL=\"http://localhost:3000\" # URL the static server is hosted on\n\nWHITELIST_PATHS=\"\" # If set, these comma-separated route path are the only routes allowed\nBLACKLIST_PATHS=\"/wp-admin,/wp-login,/xmlrpc\" # route paths that are not allowed\n```\n\n## Handling POST requests\nAll POST requests (URL-encoded and body) are captured (and never passed through) and redirected as JSON to the endpoint set by the UPSTREAM_POST_URL env. Otherwise, POST requests are ignored.\n\n## Refreshing Static Copy\nOnce the server has downloaded the contents of the upstream server for a given request, it will continue to serve those files without hitting the upstream. \n\nYour upstream server should notify Static Proxy whenever changes are made to invalidate the cache and redownload fresh content on the next request, by calling a POST request to `/sw-api/refresh` with the header `Authorization: Bearer API_KEY` set.\n\n# License\n```\n    Copyright (C) 2023 Seshan Ravikumar\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e. \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsineware%2Fstatic-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsineware%2Fstatic-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsineware%2Fstatic-proxy/lists"}