lightninglabs / lightninglabs/aperture

LocalService redirect handler

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
268
Forks
78
Avg merge
22h 25m
Merged PRs (30d)
1

Description

When the proxy encounters an unknown route, it would be useful to have the option of responding with a redirect instead of a static site.

An example is when the proxied service has a main page/site hosted elsewhere, and it's undesirable to maintain a separate landing page for the proxy. For my use case I think only permanent (`301`) is needed, although maybe two versions could be useful:
- `servepermanentredirect`: return `301`, overrides `servestatic`
- `servetemporaryredirect`: return `302`, active when others are undefined (or static site missing?)

I don't have a specific case in mind for the temporary version, but it seems like it could be useful for maintenance. Or maybe a simple `serveredirect` would be plenty, and the code could be set another way if needed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the LocalService handler for unknown routes and the existing servestatic configuration. Clarify whether permanent and temporary redirect modes are both needed, then add coverage for the selected behavior and verify the existing fallback behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.