{"id":23089180,"url":"https://github.com/marahin/moor2","last_synced_at":"2025-06-23T19:05:42.991Z","repository":{"id":89622691,"uuid":"244899161","full_name":"Marahin/moor2","owner":"Marahin","description":"Worthy successor of moor, moor2 is a serverless based door to Medium","archived":false,"fork":false,"pushed_at":"2020-03-04T16:39:00.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-02-27T18:55:56.389Z","etag":null,"topics":["medium","proxy","serverless","trap","zeit","zeit-now"],"latest_commit_sha":null,"homepage":"https://moor2.marahin.pl","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marahin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-03-04T12:50:21.000Z","updated_at":"2024-06-19T07:48:50.366Z","dependencies_parsed_at":null,"dependency_job_id":"ce75cc1f-36c6-4aab-949d-6974334a713e","html_url":"https://github.com/Marahin/moor2","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/Marahin/moor2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marahin%2Fmoor2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marahin%2Fmoor2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marahin%2Fmoor2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marahin%2Fmoor2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marahin","download_url":"https://codeload.github.com/Marahin/moor2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marahin%2Fmoor2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261539316,"owners_count":23174135,"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":["medium","proxy","serverless","trap","zeit","zeit-now"],"created_at":"2024-12-16T20:30:38.256Z","updated_at":"2025-06-23T19:05:42.963Z","avatar_url":"https://github.com/Marahin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moor\n  \n[![CircleCI](https://circleci.com/gh/Marahin/moor2.svg?style=svg)](https://circleci.com/gh/Marahin/moor2)  \n\n**M**edium D**oor** - **moor** is a WWW proxy that fetches data from given URL (bypassing CORS and `while(1)` anti-JSON-hijack trap). \n\n**It was primarily created for fetching data from Medium-based blogs**, where you do not have any kind of API, and instead you must retrieve data like Mediums' frontend does: from `%PATH%/?format=json`. There were two caveats though:  \n\n* CORS did not allow requests from non-medium-dot-com domain,\n* it begins with `])}while(1);\u003c/x\u003e`\n\nFor that **moor** has come to life.\n\nmoor2 is different from the original moor by being serverless (prepared to host on zeit.co). This way it should be cheaper and require even less maintenance than before. \n\n## Use cases → How can I use it?\n\nThat's up to you. I use it on [my website](http://marahin.pl) to get my latest post title and link :-).\n\n## Installation\n\n1. Clone this repository\n2. Configure [https://zeit.co](zeit.co) project\n3. Deploy and have fun\n\n## Configuration\n\n### Token\n\nJust to be extra sure, moor2 requires you to set up a token. If you try to request a proxy for a URL without a token, or with an invalid one, you will get 401 Unauthorized. \n\nThe token is fetched from `TOKEN` environment variable.\n\n### CORS\n\nIn order to prevent malicious requests from third parties there is CORS support implemented.\n\nIn order to set CORS domain use `ALLOW_ORIGIN` environment variable (`ALLOW_ORIGIN=*`).\n\n### Ignored endpoints\n\nYou can set ignored endpoints (ones that will NOT be fetched) in [generic_definitions.go](moor/generic_definitions.go#L13).\n  \n### Blocked characters amount\n\nBlocked characters amount is the amount of characters that prefix the JSON output. It's default value can be seen in [moor/generic_definitions.go](moor/generic_definitions.go#L8) but you can also overwrite it using `MOOR_BLOCKER_CHARACTERS_AMOUNT` environment variable (as seen in [moor/http_client.go](moor/http_client.go#L18)). Default value is enough to remove Medium's trap.\n\n## Usage\n\n```\nGET your.moor.instance.now.sh/api/medium?url=URL_ENCODE(URL_TO_FETCH)\u0026token=token\n```\n\n## Contributing\n\nIf you wish to contribute please create a pull request or an issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarahin%2Fmoor2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarahin%2Fmoor2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarahin%2Fmoor2/lists"}