{"id":15759611,"url":"https://github.com/talyssonoc/express-ajax-only","last_synced_at":"2025-03-31T09:11:45.960Z","repository":{"id":16907729,"uuid":"19668760","full_name":"talyssonoc/express-ajax-only","owner":"talyssonoc","description":"Express middleware for only accept AJAX request for a given URL","archived":false,"fork":false,"pushed_at":"2014-05-15T23:09:59.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T15:51:55.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"madgik/exareme","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/talyssonoc.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":"2014-05-11T14:48:22.000Z","updated_at":"2023-02-02T20:44:52.000Z","dependencies_parsed_at":"2022-08-04T20:00:56.700Z","dependency_job_id":null,"html_url":"https://github.com/talyssonoc/express-ajax-only","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talyssonoc%2Fexpress-ajax-only","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talyssonoc%2Fexpress-ajax-only/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talyssonoc%2Fexpress-ajax-only/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talyssonoc%2Fexpress-ajax-only/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talyssonoc","download_url":"https://codeload.github.com/talyssonoc/express-ajax-only/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443538,"owners_count":20778249,"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-10-04T10:21:53.006Z","updated_at":"2025-03-31T09:11:45.936Z","avatar_url":"https://github.com/talyssonoc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ajax-only\n\nExpress middleware for only accept AJAX request for a given URL\n\n## Example\n\n```js\n\tvar ajaxOnly = require('ajax-only');\n\tapp.get('/api/*', ajaxOnly([options]));\n\tapp.get('/api/', api.index);\n```\n\n## Options\n\n* `redirect`:  URL to where the user will be redirected if using a non-AJAX request (default: false)\n* `status`: If using redirect, redirect it with this status. Otherwise, send a response with this status (default: 302 for `redirect`, 404 for `body`)\n* `body`: If not using redirect, send a response with this body (default: 'Not found' or the http.STATUS_CODE for the given status)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalyssonoc%2Fexpress-ajax-only","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalyssonoc%2Fexpress-ajax-only","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalyssonoc%2Fexpress-ajax-only/lists"}