{"id":19034597,"url":"https://github.com/shannah/cors-proxy","last_synced_at":"2025-04-23T17:46:36.334Z","repository":{"id":30468937,"uuid":"34022928","full_name":"shannah/cors-proxy","owner":"shannah","description":"Proxy servlet that adds Allow-Origin headers to allow for CORS","archived":false,"fork":false,"pushed_at":"2017-02-14T18:16:25.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T04:12:16.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/shannah.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}},"created_at":"2015-04-15T23:02:35.000Z","updated_at":"2017-07-20T03:02:25.000Z","dependencies_parsed_at":"2022-09-13T21:21:34.903Z","dependency_job_id":null,"html_url":"https://github.com/shannah/cors-proxy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannah%2Fcors-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannah%2Fcors-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannah%2Fcors-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shannah%2Fcors-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shannah","download_url":"https://codeload.github.com/shannah/cors-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250484755,"owners_count":21438301,"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-11-08T21:45:50.557Z","updated_at":"2025-04-23T17:46:36.281Z","avatar_url":"https://github.com/shannah.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codename One CORS Proxy\n\nThis project includes proxy servlets that can be used in conjunction with a Codename One Javascript application to provide CORS (cross-origin requests) support.\n\n## Getting Started\n\n1. Either [download the .war distribution](https://github.com/shannah/cors-proxy/releases) or build from source.\n2. Deploy the .war on your server. \n3. [Configure your Codename One application](#configuring-your-codename-one-application) to point to your proxy servlet.\n\n### Building from Source\n\n~~~~\n$ git clone https://github.com/shannah/cors-proxy.git\n$ cd cors-proxy\n$ mvn package\n~~~~\n\nDeploy the resulting .war file (located in the `target` directory) on your server.\n\n### Testing the Proxy\n\nOnce you have deployed the .war file on your server, the servlet will be available `http://example.com/yourwebapp/cn1-cors-proxy`.  The proxy takes a single GET parameter (`_target`) which specifies the URL that you wish to access.  E.g. `http://example.com/yourwebapp/cn1-cors-proxy?_target=http://www.codenameone.com`.\n\n### Configuring Your Codename One Application\n\nThere are two ways to \"tell\" your Codename One application about your proxy servlet.\n\n1. In your Java source :\n  \n  ~~~~\n  Display.getInstance().setProperty(\"javascript.proxy.url\", \"http://example.com/yourwebapp/cn1-cors-proxy?_target=\");\n  ~~~~\n2. In your index.html file.\n  \n  ~~~~\n  \u003cscript\u003e\n    window.cn1CORSProxyURL='http://example.com/yourwebapp/cn1-cors-proxy?_target=';\n  \u003c/script\u003e\n  ~~~~\n\n# Advanced\n\n1. [Deploying on AppEngine](https://github.com/shannah/cors-proxy/wiki/Deploying-on-App-Engine)\n2. [Embedding Servlet into Existing Project](https://github.com/shannah/cors-proxy/wiki/Embedding-Servlet-into-Existing-Project)\n\n# Learn More\n\n1. Learn more about [Codename One](http://www.codenameone.com)\n\n# Credits\n\n1. The CORSProxy class extends [Smiley's HTTP Proxy](https://github.com/mitre/HTTP-Proxy-Servlet)\n2. The GAEProxyServlet class is adapted from [this servlet](http://www.javased.com/?source_dir=http-testing-harness/server-provider/src/main/java/org/sonatype/tests/http/server/jetty/impl/ProxyServlet.java) which was developed by Mort Bay Consulting Pty. Ltd.\n3. This project developed and maintained by [Steve Hannah](http://sjhannah.com)\n\n# License\n\nApache 2.0 License\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshannah%2Fcors-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshannah%2Fcors-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshannah%2Fcors-proxy/lists"}