Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "BaseURL Rewrite" plugin to list of plugins #140

Merged
merged 1 commit into from Mar 21, 2023

Conversation

christian-krieg
Copy link
Contributor

Hey guys, it would be cool to see my plugin propagating to your awesome list of awesome plugins!

@dgw
Copy link
Member

dgw commented Mar 21, 2023

Huh, you automated something I set up (multiple domains, one instance). In my case I just pick which domain to use depending on context, but this looks like a handy convenience!

@dgw dgw merged commit 74a6bc2 into YOURLS:main Mar 21, 2023
@ozh
Copy link
Member

ozh commented Mar 21, 2023

Very nice. Plugin readme with details, screenshot to illustrate, everything looks very neat. Thanks !

@christian-krieg
Copy link
Contributor Author

Huh, you automated something I set up (multiple domains, one instance). In my case I just pick which domain to use depending on context, but this looks like a handy convenience!

JFYI, I now added an option to specify the name of a query parameter, which can be used to define the base URLs of generated short URLs if using the REST API. This probably allows to be used in a multi-domain/single-instance setting.

E.g. (if the query parameter is specified as base_url), then

https://link.acme.com/yourls-api.php?base_url=https://foo.bar&signature=XXXXXXXXXX&action=shorturl&format=txt&url=https://short.this/url/for/me

returns something like

https://foo.bar/Ac3fG

while

https://link.acme.com/yourls-api.php?base_url=https://bar.baz&signature=XXXXXXXXXX&action=shorturl&format=txt&url=https://short.this/url/for/me

returns something like

https://bar.baz/Ac3fG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants