How to add a route with special characters?
!Friendica Developers I just wanted to implemented some more Mastodon API endpoint: docs.joinmastodon.org/methods/…
So I added this endpoint: /tags/{hashtag}
- but this doesn't seem to cover any url like /api/v1/tags/%23PVgegenPutin
The %
is the problem here. How has the route definition has to be defined?
Gidi Kroon
in reply to Michael Vogel • •Friendica Developers reshared this.
Michael Vogel
in reply to Gidi Kroon • • •Friendica Developers reshared this.
Hypolite Petovan
in reply to Michael Vogel • • •Michael Vogel
in reply to Hypolite Petovan • • •pagename
variable is set. I hope that you can solve this.Friendica Developers reshared this.
Hypolite Petovan
in reply to Michael Vogel • • •@Michael Vogel It looks like we need to add the
B
flag to the RewriteRule statment in the.htaccess
file.Not sure about nginx though.
Friendica Developers reshared this.
Hypolite Petovan
in reply to Hypolite Petovan • • •.htaccess-dist
file and we'll need to add this change to the release notes because it needs to be applied to production files that we do not control (ping @Tobias )Friendica Developers reshared this.
Michael Vogel
in reply to Hypolite Petovan • • •B
here:RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
Friendica Developers reshared this.
Hypolite Petovan
in reply to Michael Vogel • • •RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA,B]
like this
Michael Vogel and Roland Häder like this.
Friendica Developers reshared this.
Michael Vogel
in reply to Hypolite Petovan • • •like this
Hypolite Petovan and Roland Häder like this.
Friendica Developers reshared this.
Hypolite Petovan
Unknown parent • • •Friendica Developers reshared this.
utzer [Friendica]
Unknown parent • • •Friendica Developers reshared this.
Hypolite Petovan
in reply to utzer [Friendica] • • •utzer [Friendica] likes this.
Friendica Developers reshared this.
Marek Bachmann
in reply to Hypolite Petovan • • •Friendica Developers reshared this.
Hypolite Petovan
in reply to Marek Bachmann • • •@Marek Bachmann :friendica: @utzer ~Friendica~ What happens when you navigate to the following URL: friendica.mbbit.de/calendar/%2…
If you see your own calendar, nginx needs a fix for URL-encoding the pagename parameter when rewriting URL. If you see a "Not Found" error page, it's working as expected.
Friendica Developers reshared this.
Marek Bachmann
in reply to Hypolite Petovan • • •Friendica Developers reshared this.
Hypolite Petovan
in reply to Marek Bachmann • • •Friendica Developers reshared this.
Hypolite Petovan
Unknown parent • • •Friendica Developers reshared this.