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

Can this proxy be used when the host SP environment (on prem) has a "strict-origin-when-cross-origin" HTTP referrer policy? #142

Open
samperrow opened this issue Apr 7, 2022 · 3 comments

Comments

@samperrow
Copy link

I have tried connecting to an on-premise SP environment with those safeguards, but I haven't been able to successfully make HTTP requests via this proxy service.

@koltyakov
Copy link
Owner

koltyakov commented Apr 8, 2022

Hey @samperrow,

Do you have an idea how I could configure on-prem instance with strict-origin to verify if it works?

Could you check are you able consuming SharePoint API via sp-request. If it worked I guess I can manage a referrer to workaround the policy.

@samperrow
Copy link
Author

@koltyakov I do not know how you could configure an on-prem SP instance to test this unfortunately..
And I wasn't able to get this working with sp-request, so maybe there is no work-around that is readily available.

@davea38
Copy link

davea38 commented May 11, 2023

@samperrow in short you can do this but you need to have some middleware that changes the origin of the host header to match the target URL. For express http-proxy-middleware has this functionality in its createProxyMiddleware method.

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

No branches or pull requests

3 participants