{"id":13410060,"url":"https://github.com/iamelevich/pocketbase-plugin-proxy","last_synced_at":"2026-03-11T11:02:43.028Z","repository":{"id":143584971,"uuid":"616204629","full_name":"iamelevich/pocketbase-plugin-proxy","owner":"iamelevich","description":"This plugin allow proxify requests to other host. It can be useful if you want to use separate server as frontend but use one address for both frontend and backend.","archived":false,"fork":false,"pushed_at":"2026-03-06T01:23:54.000Z","size":550,"stargazers_count":21,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-06T05:29:38.370Z","etag":null,"topics":["pocketbase","pocketbase-plugins","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamelevich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-19T22:32:42.000Z","updated_at":"2026-03-06T01:23:56.000Z","dependencies_parsed_at":"2025-12-15T01:01:31.974Z","dependency_job_id":null,"html_url":"https://github.com/iamelevich/pocketbase-plugin-proxy","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/iamelevich/pocketbase-plugin-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamelevich","download_url":"https://codeload.github.com/iamelevich/pocketbase-plugin-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30379264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["pocketbase","pocketbase-plugins","proxy"],"created_at":"2024-07-30T20:01:04.749Z","updated_at":"2026-03-11T11:02:43.023Z","avatar_url":"https://github.com/iamelevich.png","language":"Go","funding_links":[],"categories":["Plugins","Tools/Plugin","Go Plugins"],"sub_categories":["Extended Go"],"readme":"[![Test](https://github.com/iamelevich/pocketbase-plugin-proxy/actions/workflows/test.yml/badge.svg)](https://github.com/iamelevich/pocketbase-plugin-proxy/actions/workflows/test.yml)\n[![codecov](https://codecov.io/github/iamelevich/pocketbase-plugin-proxy/graph/badge.svg?token=MAXWWCGHWD)](https://codecov.io/github/iamelevich/pocketbase-plugin-proxy)\n\n\u003c!-- TOC --\u003e\n* [Overview](#overview)\n  * [Requirements](#requirements)\n  * [Installation](#installation)\n  * [Example](#example)\n* [pocketbase\\_plugin\\_proxy](#pocketbasepluginproxy)\n  * [Index](#index)\n  * [func DefaultSkipper](#func-defaultskipper)\n  * [type Options](#type-options)\n  * [type Plugin](#type-plugin)\n    * [func MustRegister](#func-mustregister)\n    * [func Register](#func-register)\n    * [func \\(\\*Plugin\\) SetSkipper](#func-plugin-setskipper)\n    * [func \\(\\*Plugin\\) Validate](#func-plugin-validate)\n* [Contributing](#contributing)\n  * [Process](#process)\n  * [Development setup](#development-setup)\n  * [Testing](#testing)\n  * [Linting](#linting)\n  * [Docs update in README](#docs-update-in-readme)\n\u003c!-- TOC --\u003e\n\n# Overview\n\nThis plugin allow proxify requests to other host. It can be useful if you want to use separate server as frontend but use one address for both frontend and backend.\n\n## Requirements\n\n- [Pocketbase](https://github.com/pocketbase/pocketbase)\n\n## Installation\n\n```bash\ngo get github.com/iamelevich/pocketbase-plugin-proxy\n```\n\n## Example\n\nYou can check examples in [examples folder](/examples)\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\tproxyPlugin \"github.com/iamelevich/pocketbase-plugin-proxy\"\n\t\"github.com/pocketbase/pocketbase\"\n)\n\nfunc main() {\n\tapp := pocketbase.New()\n\n\t// Setup proxy plugin\n\tproxyPlugin.MustRegister(app, \u0026proxyPlugin.Options{\n\t\tEnabled: true,\n\t\tUrl:     \"http://localhost:3000\",\n\t})\n\n\tif err := app.Start(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n\u003c!-- gomarkdoc:embed:start --\u003e\n\n\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# pocketbase\\_plugin\\_proxy\n\n```go\nimport \"github.com/iamelevich/pocketbase-plugin-proxy\"\n```\n\n## Index\n\n- [func DefaultSkipper\\(c \\*core.RequestEvent\\) bool](\u003c#DefaultSkipper\u003e)\n- [type Options](\u003c#Options\u003e)\n- [type Plugin](\u003c#Plugin\u003e)\n  - [func MustRegister\\(app core.App, options \\*Options\\) \\*Plugin](\u003c#MustRegister\u003e)\n  - [func Register\\(app core.App, options \\*Options\\) \\(\\*Plugin, error\\)](\u003c#Register\u003e)\n  - [func \\(p \\*Plugin\\) SetSkipper\\(skipper Skipper\\)](\u003c#Plugin.SetSkipper\u003e)\n  - [func \\(p \\*Plugin\\) Validate\\(\\) error](\u003c#Plugin.Validate\u003e)\n- [type Skipper](\u003c#Skipper\u003e)\n\n\n\u003ca name=\"DefaultSkipper\"\u003e\u003c/a\u003e\n## func [DefaultSkipper](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L18\u003e)\n\n```go\nfunc DefaultSkipper(c *core.RequestEvent) bool\n```\n\nDefaultSkipper skip proxy middleware for requests, where path starts with /\\_/ or /api/.\n\n\u003ca name=\"Options\"\u003e\u003c/a\u003e\n## type [Options](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L23-L34\u003e)\n\nOptions defines optional struct to customize the default plugin behavior.\n\n```go\ntype Options struct {\n    // Enabled defines if proxy should be enabled.\n    Enabled bool\n\n    //Url to the target.\n    //\n    //Only http and https links are supported.\n    Url string\n\n    // Are proxy logs enabled?\n    ProxyLogsEnabled bool\n}\n```\n\n\u003ca name=\"Plugin\"\u003e\u003c/a\u003e\n## type [Plugin](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L36-L48\u003e)\n\n\n\n```go\ntype Plugin struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"MustRegister\"\u003e\u003c/a\u003e\n### func [MustRegister](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L168\u003e)\n\n```go\nfunc MustRegister(app core.App, options *Options) *Plugin\n```\n\nMustRegister is a helper function that registers plugin and panics if error occurred.\n\n\u003ca name=\"Register\"\u003e\u003c/a\u003e\n### func [Register](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L177\u003e)\n\n```go\nfunc Register(app core.App, options *Options) (*Plugin, error)\n```\n\nRegister registers plugin.\n\n\u003ca name=\"Plugin.SetSkipper\"\u003e\u003c/a\u003e\n### func \\(\\*Plugin\\) [SetSkipper](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L97\u003e)\n\n```go\nfunc (p *Plugin) SetSkipper(skipper Skipper)\n```\n\nSetSkipper set skipper function that should return true if that route shouldn't be proxied.\n\nIf not set, the DefaultSkipper is used:\n\nIf set \\- you should also control the middleware behavior for /\\_/ and /api/ routes.\n\nExample:\n\n```\nplugin := proxyPlugin.MustRegister(app, \u0026proxyPlugin.Options{\n\tEnabled: true,\n\tUrl:     \"http://localhost:3000\",\n})\nplugin.SetSkipper(func(c *core.RequestEvent) bool {\n\treturn c.Request.URL.Path == \"/my-super-secret-route\"\n})\n```\n\n\u003ca name=\"Plugin.Validate\"\u003e\u003c/a\u003e\n### func \\(\\*Plugin\\) [Validate](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L51\u003e)\n\n```go\nfunc (p *Plugin) Validate() error\n```\n\nValidate plugin options. Return error if some option is invalid.\n\n\u003ca name=\"Skipper\"\u003e\u003c/a\u003e\n## type [Skipper](\u003chttps://github.com/iamelevich/pocketbase-plugin-proxy/blob/master/plugin.go#L15\u003e)\n\n\n\n```go\ntype Skipper func(c *core.RequestEvent) bool\n```\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n\n\n\u003c!-- gomarkdoc:embed:end --\u003e\n\n# Contributing\n\nThis pocketbase plugin is free and open source project licensed under the [MIT License](LICENSE.md).\nYou are free to do whatever you want with it, even offering it as a paid service.\n\n## Process\n\n- Fork the repo\n- Create a new branch\n- Make your changes\n- Create a pull request\n- Wait for review\n- Make changes if needed\n- Merge\n- Celebrate :)\n\n## Development setup\n\n- Install [mise](https://mise.jdx.dev/installing-mise.html) and run `mise install`.\n- Setup `prek` hooks with `prek install -t commit-msg -t pre-commit`\n\n## Testing\n\n- Run `mise run test` to run tests\n- Run `mise run test-report` to run tests and get coverage report in `./coverage.html`\n\n## Linting\n\n- Run `mise run lint` to run linters\n\n## Docs update in README\n\n- Run `mise run docs` to update docs in README (it will also install [gomarkdoc](https://github.com/princjef/gomarkdoc))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-proxy/lists"}