question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use custom URL for Sprig action requests

See original GitHub issue

Is 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:closed
  • Created a year ago
  • Comments:24

github_iconTop GitHub Comments

1reaction
hiaslcommented, Sep 7, 2022

@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

1reaction
martinhellwagnercommented, May 6, 2022

Of course, an else condition – so obvious! I think that’ll work great – thanks for the help! 🙂

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found