Use custom URL for Sprig action requests
See original GitHub issueIs your feature request related to a problem? Please describe.
We’re currently facing the situation in which our site is running with one URL (e.g. https://www.domain.com
), but the Sprig actions requests must be served with a different URL (e.g. https://content.domain.com/index.php/actions/...
). Thus, I’m wondering if it’s possible to use a custom URL for Sprig action requests.
Describe the solution you would like
A possible solution would be to set a custom URL for Sprig action requests in the sprig.php
config file, which ultimately gets passed down to the _getSprigActionUrl
function.
Describe alternatives you have considered
Currently, I’m replacing the “wrong” URL with the “right” URL directly in the _getSprigActionUrl
function, which is by no means a clean solution.
Issue Analytics
- State:
- Created a year ago
- Comments:24
Top Results From Across the Web
Spring Security – Configuring Different URLs - Baeldung
In this tutorial, we'll look at how to configure Spring Security to use different security configurations for different URL patterns.
Read more >Redirect to an external URL from controller action in Spring MVC
You can use the RedirectView . Copied from the JavaDoc: View that redirects to an absolute, context relative, or current request relative URL....
Read more >Creating a Custom Login Form - Spring
This guide builds off of Hello Spring MVC Security Java Config to explain how to configure and use a custom login form with...
Read more >Spring Boot Security Customize Login and Logout
Spring Security code examples to configure login and logout details. ... In case you want to use your own login page, specify URL...
Read more >Retrofit 2 — How to Use Dynamic Urls for Requests
Actually, this will result in the same final request url, because endpoint urls that start with a leading slash will be appended to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bencroker yeah, you’re right, this is the difference. thanks for finding this out!
@martinhellwagner this might be interesting for you: https://github.com/putyourlightson/craft-sprig/issues/257#issuecomment-1239469060
Of course, an
else
condition – so obvious! I think that’ll work great – thanks for the help! 🙂